The IERS https://www.iers.org/ is in charge of monitoring the spinning of the Earth. On the basis of their assessment a decision is made every six months whether to inject (or indeed remove) a leap second.
If we decided not to match UTC to UT and thus we did not care precisely how quickly or slowly the Earth is spinning, we could abolish leap seconds.
If you meant, "Why can't we precisely predict the motions of a vast rock floating in space years into the future" then I don't know what to tell you. We're not God?
IMO this feels like the more interesting one to explore: are leap seconds wholly from things that are within measurement error in existing rotation, or is the Earth's rotational rate actually changing? If we had leap minutes as the smallest increment, could we predict them out centuries in advance? etc
Leap seconds account for the accumulated difference in the rotational period from time to time.
Turns out the rotation speed of Earth varies. Things like tides, earthquakes, and climate change can affect it. There is no formula for that, the only thing you can do is measure and issue a leap second when required.
> I don't think gpsd has any reason to be predicting when a future leap-second is going to occu
Until last year, leap seconds had been very predicable. The effect of global warming on earth rotational speeds was only very recently seen, or even predicted. But, yes, going forward, that needs to change.
> And the code in question is clearly expecting only positive leap-seconds.
Yes, because until 2020, the thought of a negative leap second was unthinkable. I would welcome you testing that and seeing what falls out.
Interestingly enough we're finding out that a lot of our solar cycles are probably due to massive things in very long orbits in our solar system.
I mean sure it would be annoying but its a one time change and our generation has to endure the pain of upgrading our systems, but it would be worth it no?
Sonuds like "make it a problem that will not happen in my life time".
Of course, the 'correct' way to fix it would be to use TAI rather than UTC just about everywhere, but that change would be hard to implement compared to just not adding more leap seconds.
Why do you believe that?
> Either put them in or don't.
Sure, if you have a time machine we can go tell them not to add leap seconds.
Google already don't. But I think they had to patch their kernels etc. to achieve that.
Leap seconds were a bad solution and we should remove them from general-purpose computer systems (some very specialised systems may need them). But it's a massive coordination problem and most people just don't care enough to change anything.
It looks like it you would need to change the Earth's rotational energy by ~1.4*10^22 J to change the length of a mean solar day by 1/365 seconds (which would cause UTC to change by 1 second per year). If energy costs 1 cent per kilowatt hour, this is only around $40 trillion, which is much less than I was expecting.
If energy becomes a few orders of magnitude cheaper and someone knows a reasonable mechanism to put that energy into the earth's rotation, Google or someone similar might find it easier to keep days at 86400 seconds than to deal with leap seconds.
(The joke is, if your business workflow is different to their software, it's the business model that has to be adjusted.)
It will drift slightly over the centuries. Is that a big deal compared to even the variation inside a time zone?