A GPSD time warp
A GPSD time warp
Posted Aug 5, 2021 17:54 UTC (Thu) by ncm (guest, #165)In reply to: A GPSD time warp by NYKevin
Parent article: A GPSD time warp
Posted Aug 5, 2021 18:41 UTC (Thu)
by NYKevin (subscriber, #129325)
[Link] (4 responses)
* Unix time can't represent 23:59:60, so doing things as specified by UTC is impossible. You have to deviate from UTC in one fashion or another, or else you have to completely tear out and replace the entire POSIX time API. The question is *not* "Should we deviate from UTC?" because we have no choice. The question instead is "*How* shall we deviate from UTC?"
Posted Aug 6, 2021 16:23 UTC (Fri)
by tialaramex (subscriber, #21167)
[Link] (3 responses)
In a thousand years, if people are annoyed about when the sun is highest in the sky according to their wristwatch, they can lobby their local government to tweak their timezones, but TAI continues unaltered. If there are people. And wristwatches. And governments. And timezones. The Sun isn't going anywhere in that timeframe, but we might.
I don't care if we abolish leap seconds and keep UTC offset as it is, abolish UTC entirely, or even find some weird compromise, but the current situation is very silly, even if there are other sillier things that could have happened instead.
Posted Aug 6, 2021 17:48 UTC (Fri)
by NYKevin (subscriber, #129325)
[Link]
Yes, getting rid of leap seconds would solve the problem at a stroke, but Wikipedia reckons that the politicians have been bickering over it since 2005 with little apparent progress: https://en.wikipedia.org/wiki/Leap_second#International_p...
Any country in the world could unilaterally start following TAI instead of UTC, of course. Civil time is ultimately "just a law" that each national legislature passes independently. It simply happens to be the case that everyone currently uses UTC. But the disruption of having some time zones following TAI and some following UTC would make this problem quadratically more complicated, rather than simplifying anything.
Posted Aug 6, 2021 19:05 UTC (Fri)
by Cyberax (✭ supporter ✭, #52523)
[Link] (1 responses)
TAI differs from the UTC by 37 seconds right now. This is pretty significant for many applications, and the flag-day switch will likely cause a lot of very unfunny hilarity.
I've had experience with this before. One of my previous jobs had a database that was configured to use TAI for timestamps for some reason, and switching to UTC resulted in quite a few interesting problems.
Posted Aug 6, 2021 19:33 UTC (Fri)
by tialaramex (subscriber, #21167)
[Link]
Yes politicians will take many years to actually make it happen. Unlike with climate change if they take 20 more years to do anything about Leap Seconds solving the problem will probably be about the same difficulty, we'll have just wasted 20 years.
Posted Aug 15, 2021 18:29 UTC (Sun)
by intgr (subscriber, #39733)
[Link]
Surely all computers using the same smearing configuration will agree what time it is? So the appropriate thing to do would be to standardise the leap smearing configuration, seems easier than any of the alternatives. And the industry has already been moving in this direction.
A GPSD time warp
* Jumping time backwards is notorious for breaking things, because you get non-monotonic timestamps. Testing for those bugs is hard. Fixing those bugs is also hard.
* Yes, CLOCK_MONOTONIC exists. You get a gold star if you remembered to use it everywhere. But did you audit all of the library code in your entire sprawling application? What about all of the daemons and other services that it relies on? Are you absolutely sure that every single time anyone asks for any timestamp, in any part of the system whatsoever, they always scrupulously observe the distinction between CLOCK_MONOTONIC and CLOCK_REALTIME, and never inadvertently assume that the latter will be monotonic?
* In practice, many sysadmins were already using ntpd -x to get the same effect, but worse (because it would only start slewing after the leap second, and do so in a less predictable way over a shorter period of time, with the result that the clock gets way wonkier than under "proper" leap smearing).
A GPSD time warp
A GPSD time warp
A GPSD time warp
A GPSD time warp
A GPSD time warp
