33 comments

[ 3.8 ms ] story [ 52.1 ms ] thread
Does this mean the negative leap second isn't happening anymore?
(comment deleted)
I enjoy how Chrome asks me if I want to auto translate from German to English. Where did it get German from? It's French!
"To authorities responsible for the measurement and distribution of time" is just the best preamble ever.
(comment deleted)
What happens to systems such as Spanner under these circumstances?

Is it a headache or a non-issue

Hear me out. We can just mount jet engines along the equator and rotate them 180 to gain or lose time. And then connect them to my snooze button.
As one HN comment said years ago: I feel leap seconds have always lived in the wrong abstraction layer.

They should live in the same abstraction layer that does leap days and daylight savings: the time zones.

That would create much more chaos, because every region autonomously decides on its timezone(s). You'd have different countries and/or timezones using different leap second counts.
Yes! I yearn for the day when central daylight savings time is 1:00:00:36 behind eastern time, but standard central time remains offset by 1 hour exactly (except for leap years, which are obviously 1:00:00:36 offset all year round).
They should have a global holiday to celebrate the people who maintain time/date related code in OS kernels that keeps the world from imploding.
They're cool people but like it doesn't stop the world from imploding. Most of all of our code is full of trivial bugs and edge cases and most people don't mind too much. Certainly no one cares about leap seconds, they hardly even notice DST or leap days
> The difference between Coordinated Universal Time UTC and the International Atomic Time TAI is :

>

> from 2017 January 1, 0h UTC, until further notice : UTC-TAI = -37s

This means the atomic clock is behind the solar clock by 37 seconds? I also don’t understand the reference to 2017.

What causes the unpredictability in this? I would have guessed we have earth's rotation and orbit down to many decimals. Does geological activity, weather, or something else cause rotation speed differences that we just can't predict?
Even the migrations of animals can impact it, although they usually cancel out over the course of a year I think.
I predict there will be a news story or broadcast news pundit who blames this on climate change. bonus points if it winds up on dytime talk shows
Quite the opposite. The earth's rotation can vary by quite a few seconds each year. But over hundreds of years, the variations mostly cancel out, which is why I think trying to add or remove leap seconds are a bad idea. The only people who care about such things are space agencies, and they can apply whatever offset they want, it doesn't need to affect everyone else.

Arguably, the only real-world impact this drift has on normal people is GPS, but GPS already transmits an offset from its own clock so that receivers can correct for that. The GPS clock is different both from UTC and TIA.

If the UTC-TAI offset remains at -37s, then it also means the UTC-GPS offset remains at -18s. TAI and GPS have a constant 19s offset from each system.
My longevity will extend one second into the future in nominal terms, increasing the chance to reach the 22nd century a tiny bit.
Cool, I don't have to set my clocks back this December.
World will end at 26 December so no leap second needed
ELI5: How does this impact UNIX timestamps? Particularly for things that are in maintenance mode or otherwise minimally maintained.

Nothing I do requires this level of precision, but certainly there are things that do.

Yes, time() and clock_gettime(CLOCK_REALTIME) results are affected by leap seconds.

New leap second will get to your system through NTP. Sadly NTP only distributes indicator flag that leap second is going to be introduced, but not the offset itself. But the distributed time itself is already affected by leap second, so NTP client doesn't really need to know.

(In contrast the other time sync mechanisms - GPS and PTP - use time scale unaffected by leap seconds and distribute it as an additional information with UTC offset. And it's left on client to modify received time on its end. Kernel has a parameters in clock_adjtime() for leap seconds.)

So if you have a passive system that has NTP client then it's time will change for new leap second on runtime. Linux treats UTC time as the dominant one, so that's the one saved to RTC device and will survive reboot.

There is CLOCK_TAI that sounds like it should return TAI time, but it is such a second class citizen to the point that nothing on regular Linux desktop and server distros even set the offset and it returns the same time as CLOCK_REALTIME.

There is a file in /etc with list of leap seconds that is part of some package, so you need to update the system to update this file. I don't believe traditional NTP software updates this package dynamically. But not many software uses it. If some init service script parsed and set the kernel UTC offset then your system's CLOCK_TAI would be one second late from rest of the world until update. But it doesn't affect UTC time on Linux in any way I know.

looks like tons of service will crash at the new year eve
Isn't this anti-news? I vaguely remember they have stopped introducing leap seconds until further notice because they cause too much trouble with today's computing systems. On my phone now and did not research it, as I say vaguely remember. Now we are 37 seconds off. Nobody of us will have to worry that Christmas is around Easter time. We can leave that problem to future generations much more responsibly than many other problems.

That the notice comes every 6 months is just to meet the letter of the original international treaty.

With the Temporal API will all of the browsers / nodejs etc be able to get the time right when performing operations around that time or will they need to be updated in order to not mess up calculations?
The man with more than one watch never knows what time it is.