3 ms·
The problem with leap seconds is that any conversion between TAI and UTC for a time stamp more than 6 months in the future is undefined. If we did the same thi
by phicoh 2y ago
The problem with leap seconds is that any conversion between TAI and UTC for a time stamp more than 6 months in the future is undefined.
If we did the same thing with time zones or leap days, that some committee would only announce changes a few months in advance then people would get very upset.
- Mountain_Skies 2y agoIt does happen, just not all that frequently. The US and Canada changed daylight saving time's dates as recently as 2007 and time zone rules are changed in various parts of the world now and then. It happens frequently enough that there's a database maintained to track it and let systems programmed to use the database to adjust to the changes.
- phicoh 2y agoThink about if it happens (or does not happen) every 6 months and you can never plan ahead. And daylight saving is a local problem. In my country the rules have not changed for more than 4 decades. The other problem is that most systems use time zones and daylight saving mostly as a presentation format. Only time that is explicitly for human consumption deals with time zones. Internally computers mostly use UTC. The problem with leap seconds is that computers often represent time as some number of seconds since an epoch. That requires a stable conversion between year-month-day-hour-minute-second to seconds since epoch. And that's where leap second are a problem. Because future leap seconds a undefined, this conversion is undefined for dates in the future. That then results in a collection of hacks to let it work most of the time. Where I live, civil time is currently off by about one hour and 41 minutes, compared to solar time. It is safe to say that essentially nobody cares about solar time with more precision than one hour. If you want to know about sunrise or sunset, you just look it up. Noon is mostly irrelevant.
- Symbiote 2y agoSome Muslim countries base their daylight savings on an Imam observing sunrise (or not) at a particular time. The DST offset isn't known until that moment.
- andrewf 2y ago>some committee would only announce changes a few months in advance then people would get very upset. This does happen, with daylight savings.
- gmiller123456 2y agoSystems that do this use the latest value for leap seconds. The conversion becomes ambiguous, but not undefined. For any system sensitive to the ambiguity, you simply would keep the time in TIA rather than convert it.