in reply to Leap second coming up. Check your date handling code
Leap seconds don't impact epoch time calculations. So I'd like to see how you, in theory, get a value of '60' for the seconds that you want to pass to something like you've shown. Code that wants to know how many seconds past the start of the current minute is first going to get 'now' as a single number of epoch seconds and then use that to ask for a list of numbers including that number of seconds past the start of the minute. Such code will never have to deal with that last number being 60.
So, for those complaining about the sloppy way that some have chosen to deal with leap seconds of smearing the 1-second jump in are being silly. Because if you don't do that, all that happens in that the 1-second jump happens more sloppily. That is, if you don't smear the leap second out, then you get the exact same value for the epoch seconds for a duration of 2 seconds! Things get worse if you ask for a high-resolution real-time clock value, likely involving your epoch seconds moving backward in time.
- tye
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Leap second coming up. Check your date handling code (reality)
by 1nickt (Canon) on Dec 27, 2016 at 21:54 UTC | |
by tye (Sage) on Dec 28, 2016 at 05:36 UTC | |
Re^2: Leap second coming up. Check your date handling code (bad theory)
by RonW (Parson) on Jan 04, 2017 at 23:22 UTC | |
by perldigious (Priest) on Jan 05, 2017 at 14:11 UTC |