Leap seconds and the tragedy of stubborn fools

We all use a time scale UTC in one form or another, because it is according to it that the time is set in each time zone. It is based on time TAI (the average time of 450 atomic clocks located around the world), which essentially makes this scale the most accurate way to calculate time. However, there is an unpleasant nuance: the duration of a solar day (one revolution of the Earth around its axis) is not equal to 24 hours (86,400 seconds according to the atomic clock; remember this figure, we will need it later). Nevertheless, we define the onset of the next calendar day precisely as a time interval of 24 hours.

Let's assume that the time it takes for the Earth to completely rotate around its axis is one second longer than 24 hours according to atomic clocks. Let the dawn come at 6 am on the first day. On the second day, dawn will occur at 06:00:01 (for simplicity, let's forget about the tilt of the earth's axis and other difficulties that may prevent us from grasping the essence of the problem). On the third day, dawn will occur at 06:00:02. After some time, we will be off by exactly 12 hours: sunset will occur at 6 am.

Fortunately, the average length of a solar day in the year 2000 was 86400.002 seconds (an escape of only 2 milliseconds per year), so the discrepancy does not accumulate so quickly, but it is there nonetheless. And if you thought this all sounded a lot like the leap year “problem,” then you’re damn right. Only there everything happens because of the rotation of the Earth around the sun, which is not equal to 365 days, but here because of the rotation of the Earth around its axis, which is not equal to 24 hours (two independent rotations, let’s not confuse them!).

The problem of the time of year shift was solved by the Gregorian calendar on October 15, 1582, which introduced an additional day in February, and the time of day problem was solved by introducing leap second in 1972, also called leap second or leap second. To put it very roughly, when the atomic clock approaches a second, it is believed that a certain predetermined day lasted a second longer (that is, 86401 seconds), and this second is added exactly at the moment of transition to the next day. That is, after the 60th second, the 61st second is counted, and only then the first second of the next day. And if you thought that I was deceiving you, then here is a picture for you

Additional 61st second introduced on December 31, 2016

Additional 61st second introduced on December 31, 2016

I will call these days leap days, by analogy with a leap year (I hope I explained clearly enough that these, although fundamentally similar, are still different concepts). This way they kill two birds with one stone: UTC ticks exactly at the speed of an atomic clock, and at the same time, the days calculated by UTC do not run forward.

We need to understand that if we wrote time as the number of seconds that have passed since some date, we would not have any problem at all and no additional seconds

- Простите, который сейчас час?

- 1 миллиард 704 миллиона 067 тысяч 200 секунд

However, during the day we want to count time precisely as the number of hours and minutes, and this is where difficulties arise. Assuming that a day lasts 86400 seconds, it was enough to divide the total number of seconds that had passed by 86400 and we got the number of days, which we then converted to a date. But now we need to take into account that some days lasted 86400 seconds, and some – 86401 seconds.

The good thing about the Gregorian calendar is that it gives a magic formula that tells you in advance which February an extra day will appear. But with extra seconds it turned out to be more difficult. They did not come up with any predetermined formula: the earth rotates unevenly, sometimes speeding up, sometimes slowing down. And yes, a situation is allowed when some day will need to be shortened by 1 second. An international committee meets and, based on observations of the Earth’s rotation, makes a decision: this year we will lengthen/shorten such and such a day by one second. From 1972 to 2024, seconds were added 27 times and never removed.

I'm sure you didn't like this whole situation. I think that when you first learned about the Gregorian calendar, you probably didn’t like it either. Well, it’s true that to convert days into years it is no longer enough to simply divide with a remainder by 365; instead, you have to use a more complex algorithm. The Orthodox Church still lives according to the Julian calendar, and today is September 15th for them. It is not surprising that a party of opponents immediately formed around leap seconds. Of course, mechanical watches opposed leap seconds; they were not ready for such a perdimonocle. True, mechanical watches move away from accurate time much faster than 2 milliseconds per year, so their opinion can probably be ignored. The authors of devices that cannot receive data about time changes from the Internet spoke. Again, it’s not very clear why, because usually they only need time to coordinate their own processes, and again, the computer’s clock can go down by seconds a day and certainly shouldn’t suffer from this. The most interesting thing is the protest of people who synchronize the time of their devices via the Internet. From a purely human point of view, they can be understood: they need to rewrite the algorithms for converting seconds into dates and monitor the introduction of new leap seconds. The Linux date program, for example, still does not know that on December 31, 2016, the last minute lasted 61 seconds.

$ date -d"2016-12-31 23:59:60 UTC" +%s

date: invalid date ‘2016-12-31 23:59:60 UTC’

The egghead creators of GLONASS got into trouble writing the correct code (and GLONASS uses UTC): their navigation system did not work for 24 hours on the night of June 30 to July 1, 1997. On January 1, 2009, the National Metrological Institute of Russia (VNIIFTRI) got into trouble (funny, right?) with its ntp servers. And meta engineers Oleg Obleukhov and Ahmad Byagowi wrote a long article about the dangers of these leap seconds, because they can lead to movement into the past! Well, yes, yes… We all remember the epoch-making article about crooked **lans and Anela cookies. All these people can be understood, but not forgiven.

But if you have realized the power and greatness of additional seconds, then here is a riddle for your friends

We are in the distant wonderful past. December 31, 2016. We are celebrating the New Year in London. Yes, where there is fish, chips, tea, crappy food, the weather is even worse, Mary, fuck her, Poppins (c). London! The clock says 23:59:50. We raised our glasses. How much time is left until the new year begins?

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *