News for hackers. Stuff that matters.
Re:Ask HN: How is it that programmers can simply ignore leap... by sla29970 on Friday January 14, 2022 @10:44PM (#29943338)
POSIX requires that we ignore leap seconds. POSIX had no alternatives to this choice because the information needed to do time right was not, and still is not, readily available via an authoritative and robust mechanism. No international recommendation has ever required the creation nor funding of a mechanism better than "This one agency in Paris will use the post office to send out letters to your national government time service agency at least 8 weeks in advance of a leap."
Re:Ask HN: How is it that programmers can simply ignore leap... by vba616 on Saturday January 15, 2022 @01:11AM (#29944030)
I was under the impression that it's fundamentally impossible to determine leap seconds in the future because the rate at which the Earth is slowing down its spin varies unpredictably.
Re:Ask HN: How is it that programmers can simply ignore leap... by sla29970 on Saturday January 15, 2022 @01:24AM (#29944087)
At the inception of leap seconds it was unclear how well they could be predicted, but the agreement required 8 weeks of notice as a minimum. Since the inception of leap seconds the rotation of the earth has accelerated, not slowed.
Re:Ask HN: How is it that programmers can simply ignore leap... by vba616 on Saturday January 15, 2022 @02:52AM (#29944590)
>Since the inception of leap seconds the rotation of the earth has accelerated, not slowed

Ok, I'm not sure if you are correcting what I wrote or not. There is a sense in which what you write is correct, I think. But the long term trend is slowing, and since the inception of leap seconds, there have been ups and downs whether or not one averages over a year.

Illustration:

https://en.wikipedia.org/wiki/Leap_second#/media/File:Deviat...

I think this is showing that the yearly cycle is larger than the change in speed in a century, and so are the cycles in the 365-day average over decade-timescales.

Re:Ask HN: How is it that programmers can simply ignore leap... by sla29970 on Saturday January 15, 2022 @12:52PM (#29948535)
Look at the past 250 years where there is not really any clear indication of deceleration https://www.ucolick.org/~sla/leapsecs/dutc.html
Re:Ask HN: How is it that programmers can simply ignore leap... by vba616 on Saturday January 15, 2022 @10:16PM (#29952919)
It says "Over the passage of centuries the rotation of the earth is being decelerated by tidal friction from the moon and sun"

Are you correcting me, or not, or what is it you are trying to communicate?

Re:Ask HN: How is it that programmers can simply ignore leap... by sla29970 on Sunday January 16, 2022 @01:15AM (#29953841)
It is possible 8 weeks in advance to predict the difference between UTC and UT1 and keep it less than 0.9 seconds. Nothing more is required by international agreement.