5 ms·
Months are fine. Leap years are fine. It’s leap seconds that annoy me.
by iso947 6y ago
Months are fine. Leap years are fine. It’s leap seconds that annoy me.
- thaumasiotes 6y ago> Leap years are fine. It’s leap seconds that annoy me. The implementation of leap seconds is obviously worse than the implementation of leap years, though. (This might make more sense if leap seconds had come first...) In a leap year, February 28 is followed by February 29, a day that doesn't ordinarily exist. It has the same weight as any other day. If you had a dentist appointment on the 29th, then on March 3rd people will all happily admit that the 29th happened and you might have had a dentist appointment on that day. In a leap second, 23:59:59 is followed by 23:59:59 2, 23:59:59 Harder. Then, a few seconds later, everyone agrees to just pretend the whole thing never happened. The POSIX standard specifies that there are 86400 seconds in a day, and God forbid we deviate from the standard just because some days might -- but only in reality! -- have 86401 seconds.
- zzo38computer 6y agoI think I have seen it written as "23:59:60" during a leap second. In Unix time, you could code it as the previous second but +1 billion nanoseconds, or as the next second but -1 billion nanoseconds (if you use this option, the number of nanoseconds must be a signed type).