While writing these notes , I felt I wanted to spend a bit more time understanding time (pun intended). I watched this lecture by Martin Kleppmann. I found the part about leap second particularly interesting. Hence I thought of digging a bit deeper into it.
Wikipedia definition is fairly good. You can read linked pages to understand International Atomic Time (TAI) and Universal Time (UT1).
- Until now leap seconds have always been applied on either June 30 or December 31. We have seen 27 leap seconds since 1972.
- The decision to add a leap second is made by the International Earth Rotation and Reference Systems Service (IERS) about 6 months in advance.
- Since the turn of the century, due to the rise of digital technology the occurrence of leap seconds has caused some issues. For example, in 2012, due to Linux kernel bug causing an outage at Reddit and then again in 2017 to Cloudflare DNS.
- The solution applied is to smear the leap second over a period of time. This documentation talks about how Google does it plus examples of a few other smears. This article by Meta talks about it as well.
- Over the last few years there has been a debate about whether to abolish leap seconds. The argument is that leap seconds are a hassle for software developers and systems administrators. Hence in 2022, it was decided that leap seconds will be abandoned from 2035 onwards.
- Most of the countries were in favor of this decision. But not Russia because their satellites already account for leap seconds. This is not the case with other countries like the US (GPS) and India(NavIC). This article mentions what GNSS is and this article by Meta on how that ties with leap seconds. I found this article useful to understand the difference between the various time standards.
- Until now we have only seen positive leap seconds, adding a second to UTC. But there is a possibility we might see a negative leap second for the first time, for which the systems would be prepared but it would be interesting to see how it plays out in the real world.