311 points · by ChrisArchitect · 4mo ago · 244 comments
Fun fact: leap seconds will stop being a thing soonish. I think they phase out in 2035, with a delay because Russia needed time to update glonass satellites.
(Note: on mobile, this is from memory, details need checking ;))
Everybody agreed that "Leap seconds" are a sufficiently bad idea that they should be replaced by 2035. Nobody has agreed how to fix it, and "Just turn them off" isn't technically legal. However, "What if there were Leap hours instead?" is technically legal and of course those hours would happen in the very distant future (likely after our civilisation is gone) so it's functionally identical to "Just turn them off" but without legal problems.
Now, I'm English, and England loves this sort of hack. You may have heard that controversial UK politician Nigel Farage "resigned" as a Westminster MP recently and that's not technically true because you can't resign, historically people hated that job and so you can't resign and we never changed that, but what you can do, and everybody does, is get assigned an "Office of profit" in which legally the King is paying you, an MP can't work for the King so you can't be an MP any more. The "Offices of profit" in question aren't real jobs† and don't pay real money, like this "Leap Hour" they'd be a legal fiction. So everybody says you "resigned" but in fact you legally can't do that...
† I mean, historically they were real jobs that made sense which is why the King paid somebody to do them, but England is very, very old so they haven't made sense for centuries and serve only as a legal fiction today.
For those unaware, the major parties have declined to participate in the by-election triggered by Farage's resignation seeing the whole thing as a farce. As a result Farage will likely face only Count Binface, a space warrior from Sigma Six. He'd get my vote purely on the basis that he's promised to bring back Ceefax, and build at least one affordable house.
The 999 year lease to essentially make land practically freehold is one.
https://en.wikipedia.org/wiki/999-year_lease
It's caused significant controversy in my (former colony) country where all other long-term leases are 99 years. The landowners are insisting that their ancestors were cheated and they want their land back.
No. Not everybody. I prefer accurate time, and all the complaints I've heard hold little water.
My servers need to timesync forwards and back all the time, eg timedrift. They need to jump to new times, or slowly drift, depending.
VMs can be hypervisor starved, or need to move to a new host.
Servers also need to handle missing time. Any daemon or program which cannot handle this is buggy, broken, and needs to deal.
Leap seconds are just part of all of this, and present no new issues compared to normal time change. I question the capabilities of any engineer who singles out time second as difficult to deal with, time is constantly changing on servers. Constantly.
So back to the start, no... everybody doesn't agree. Google isn't "everybody".
A frightening fact, the 2011 magnitude 9.0 Tohoku Earthquake shifted the position of the Earth's figure axis about 17 centimeters, making days about 1.8 microseconds shorter.
recalling that the CGPM at its 26th meeting (2018)
- stated that UTC is the only recommended time scale for international reference and the basis of civil time in most countries,
- recommended all relevant unions and organizations to work together to develop a common understanding on the realization and dissemination of reference time scales with a view to considering the present limitation on the maximum magnitude of UT1 - UTC to meet the needs of the current and future user communities,
I accept all the other premises from the resolution, but then the obvious conclusion should be to just recommend TAI instead of UTC for any application that could be disrupted by leap seconds, instead of butchering UTC and turning it into just a worse version of TAI.Why is this? As leap seconds don’t occur on a regular frequency, I assume they are not hardcoded on the software or hardware on board, but the control centre uploads them on the satellites enough in advance once they have been scheduled. So why can’t the control centre just stop sending those updates?
This type of assumption that was made early in a massive software and hardware project that's now been ossified for ~50 years is going to be hard to change.
What are the satellites doing with the models? They're not deciding leap seconds on their own, I hope. So I don't see why the leap second decision would be locked to low accuracy.
Also I would expect doubling the precision to give you a 3-4x slowdown on the math or adding orders to have less effect, and the amount of available computation spent on those models to be like a tenth of a percent at most, so the extra cycles wouldn't be an issue. What am I missing here?
To me it seems like unpredictability is the only real issue.
GLONASS maybe? or really glasnost era satellites?
Pandemic -> more people working from home -> less people in tall office buildings -> faster rotation (like a skater pulling in their arms).
Probably not remotely true but it would be funny.
My best guess would be it's somehow related to water distribution? More water going into the atmosphere? Glaciers growing (unlikely)? Did multiple huge water reservoirs go into service and get filled up over the summer months?
"Because the Earth's rotational speed varies in response to climatic and geological events, UTC leap seconds are irregularly spaced and not precisely predictable."
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.
I don't think we know this do we? we haven't been measuring accurately enough for long enough to be confident that it does in fact cancel out. In fact for the period of time where we've been applying leap seconds they were happening with significant frequency and always in the same direction. It's only been very recently that there's been the realistic suggestion it might drift in the other direction.
If anything people have been suggesting that if we do get rid of leap seconds that we can just wait until the offset is enormous instead (say an hour) because it would take a very long time to happen. But even still, that does actually affect everyday people (because people would surely notice when solar noon is an hour later/earlier). Although pragmatically the obvious solution there is to change timezone instead.
Earths rotation has been unusually fast lately. So there is not enough drift to warrant a leap second.
Meanwhile....
International timekeepers to vote on changing the leap second to a leap hour
https://www.scientificamerican.com/article/international-tim... (https://archive.ph/GnQUj https://news.ycombinator.com/item?id=48842329)
In practice it will never affect anyone because it's a legal fiction, but even if you pretend to believe we would actually introduce this "leap hour" it would be in the distant future long after we're all dead and if there are still humans who have any idea the year 2026 happened they're not sure which of Donald Trump, Taylor Swift, Tony Stark and John McClane were real people.
Edited to add:
This is such a ridiculously long time frame that they might not be sure whether we were worried about climate change, for them that's either a disaster they survived (and maybe most didn't) or it's a weird blip in their historical charts which they struggle to explain. Did our civilisation do something very, very stupid? There is a flammable gas deep underground, did we set fire to it because we were crazy? Why the hell would we have done that? There are signs we deliberately set fire to the coal which is a toxic rock also found underground? That would explain the global climate going nuts. Maybe it was a ritual or something. Ancient people are mad.
Even if one day humans have to account for relativity in their commute, their woes will pale in comparison with those of the poor soul who has to add support for it in a C library that only understands (now, 128-bit) Unix timestamps.
Nothing I do requires this level of precision, but certainly there are things that do.
(And depending on the leap smearing implementation, it also smears CLOCK_TAI, jumps it to opposite polarity at the actual time of leap second, and then smears it again. The leap smearing people really made a mess of this.)
From a correctness perspective, the only good choice is to go all-in on TAI.
[Ed./P.S.:] "just ignore leap seconds" - that's going all-in on TAI. At this point it's probably easier to redefine UNIX timestamps as TAI based after 2035 ("abolishing leap seconds"), and introduce a new CLOCK_SOLAR_EARTH that accumulates leap seconds and can be used if/where necessary. The main issue is to create a proper delineation between the two clocks, which we just don't have at this point. Way too many systems where it's just not clear what they use.
And note that leap seconds are earth specific too. You'll have entirely different requirements on e.g. Mars.
- clarification: "fully ignorant" from a human perspective, using dates and times. UNIX time lines up with those.
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.
That the notice comes every 6 months is just to meet the letter of the original international treaty.
The reason we've stopped having leap seconds is because the drift between TAI and UT1 slowed down and has actually been very slowly drifting in the other direction.
I hope they have one of those logos with a bunch of weird freemason symbols that freak people out.
The Time Lords are a fictional ancient race of extraterrestrial people in the British science fiction television series Doctor Who. In-universe, they hail from the planet Gallifrey and are stated to have invented time travel technology.
[1] https://en.wikipedia.org/wiki/Planetary_Defense_Coordination...
Is it a headache or a non-issue
Some rare systems use monotonic oscillator seconds and ignore the earth rotation second, but if you ever have to translate those to real time, you get an accumulating disaster over time and it’s generally regarded as not a good idea.
I believe in the US this error correction has been discontinued in the East and in Texas, but is still done in the West for some kind of non-clock "inadvertent interchange" reasons I don't understand.
In the real world their scheme is doomed as it would strip the atmosphere off of the Earth, but since they were planning to leave the solar system the atmosphere was going to freeze to a solid anyway so maybe it didn't really matter. To be honest I thought the entire scheme was an extremely elaborate cover for the fact the lead ship was the actual ark and everyone else was just plain doomed. This would have mirrored one of the themes in the 3 Body Problem where interstellar space travel is strictly forbidden until everybody can participate at once. The "launch the Earth as a spaceship" concept was so poorly thought out I thought it had to be a fraud in the story, and our somewhat dense protagonists just didn't catch on.
[Spoiler]
They are good reasons. Conspiracy theorists are able to persuade almost everybody that the reasons were bullshit, an excuse to seize power or something, and so the few who still insist this was necessary and mustn't stop are executed. Almost immediately after those executions, Mother Nature proves them right. So that leaves everybody: Guilty of having murdered their saviours and with no choice but to carry on with the very plan they had insisted was bogus...
There is a Chinese movie but I'm kinda surprised no Hollywood studio got themselves a rights deal and made a US-friendly movie where the Sun conveniently blows up slightly earlier and our heroes are vindicated and everybody agrees they were right all along.
(oh and it wouldn't be strong enough to affect the Earth's rotation)
It would have to be rockets. My napkin says 2B starship boosters and 250K tons of propellant per second should give us around 1 second per year.
>
> 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.
If anything, it's the other way around.
A UTC day is defined as exactly 86400 SI seconds. But an actual mean solar day is a few milliseconds longer (although the difference is not constant due to irregularities in the Earth's rotation--but the average difference is expected to slowly increase over time). SI seconds are counted by atomic clocks, so UTC advances its day by one every 86400 atomic clock seconds.
But a solar clock that advances its day by one every time the mean sun reaches noon (it has to be the mean sun because the rate at which the actual sun moves across the sky varies over the course of a year, we need to look at the average) will advance its day a few milliseconds later than UTC does. Or, to put it another way, each time period that the solar clock says is exactly 86400 seconds, is a few milliseconds longer according to the atomic clock.
As this happens day after day, the difference accumulates, and when it gets close to being a full second, a leap second gets inserted into UTC, so that one of its days is 86401 seconds long instead of 86400. The reason for this is that UTC is not just counting atomic clock time; it also has to stay in sync with where the sun is in the sky since so many human activities are tied to that. And we humans have defined "in sync with the sun" to be "within a second of the average sun". In other words, we want UTC noon to be within a second of mean solar noon on the prime meridian.
So the 37 seconds is how far mean solar noon would be behind UTC noon, if we didn't use leap seconds--at UTC noon, the mean sun would be 37 seconds short of actually crossing the prime meridian in the sky.
Why?
If I travel 1 mile east or west of the prime meridian, my solar noon now comes 2-3 seconds earlier/later. It's nearly impossible to have your local time match your local solar noon. For most of the population, solar noon is, on average, 30 minutes off of 12:00 noon.
Plus, solar noon varies from day to day by 10-20 seconds. Check the charts out. https://www.timeanddate.com/sun/usa/new-york
Um, because it's the prime meridian and that's how UTC is defined?
> It's nearly impossible to have your local time match your local solar noon.
Which is why I specified on the prime meridian, which is the particular local meridian that UTC is defined as corresponding to.
> solar noon varies from day to day by 10-20 seconds.
Which is why I was careful to specify mean solar noon.
I'm not quite sure what your issue is. Yes, we have time zones tied to specific meridians, and the actual sun's speed in the sky varies (which I mentioned in my post, so I'm not sure why you seem to think I'm unaware of it) so in most places local time by the clock doesn't match local time by the sun. Yes, a leap second adjustment to UTC is quite a bit smaller, taken in isolation, than the annual variation in actual solar time vs. mean solar time.
But over time, if we didn't have leap seconds, the difference would accumulate. The accumulated difference now between UTC and TAI is 37 seconds--which is almost twice the maximum variation in actual solar noon from mean solar noon that you refer to. We humans have collectively decided that we don't want that, and that it's better to do the adjustments a little at a time rather than in bigger lumps.
It did not happen yet. No negative leap second that should have been inserted was skipped.
See this chart here:
https://en.wikipedia.org/wiki/DUT1#/media/File:Leapsecond.ut...
You can see the the positive leap seconds as jumps upward once the graph reaches around -0.5 s.
We were never close to reaching +0.5 seconds with a positive trend and we are still relatively far away from that.
My guess is that is when they last changed the offset, so the -37s has been in effect since then.
They should live in the same abstraction layer that does leap days and daylight savings: the time zones.
The point is that it's weird that we handle a day every 4 years off in a different way to a couple of second being off.
The notable differences are that
1) the leap second happens at the same time globally (23:59:60 UTC), while leap days start at 00:00 local time
2) leap seconds happen at irregular intervals
3) leap seconds are nearly universally implemented wrong, because the ability to show :60 on a second display for for one second at most twice per year is just not worth the implementation complexity
You could argue about 1, but the alternative would lead to much more complicated timezone math (time zones can be an additional one second apart from each other depending on whether the leap second is already applied) for very limited benefit. Number 2 seems unavoidable, and 3 is entirely unintended, just the way things have worked out in real life
My ideal year is 12 months, each 5 weeks long, each week 6 days long. At the summer solstice, 3 intercalary days (bank holidays), at the winter solstice, 2 or 3 intercalary days depending on leap year.
> Dieser URL wird nicht beantwortet. Bitte wenden Sie sich mit Ihrer Anfrage an das Bundesamt fuer Kartographie und Geodaesie.
[0] https://en.wikipedia.org/wiki/International_Earth_Rotation_a...
Most datetime APIs are fundamentally designed and intended for supporting calendar and wall clock operations for business functions. If you need SI seconds for scientific purposes, you really need to use alternative APIs and facilities that provide and guarantee the semantics required all the way down to the hardware level. Likewise, if you want timers, etc, for software facilities like thread sleeping, you use dedicated interfaces like monotonic clocks. If leap seconds are phased out, this won't really change the situation. It was wrong for software to rely on Unix timestamps for, e.g., mutex algorithms before and it'll be wrong if and when leap second clock adjustments are gone.
we were all waiting for the negative leap second to finally happen - but cowards got too afraid