Are you ready for tonight’s leap second?
No idea what I’m talking about? tl;dr – once in a while, an extra second is added to synchronize coordinated universal time (UTC) with mean solar time. This is needed because, generally, the Earth’s rotation slows down over time. Leap seconds, unlike leap years, do not occur in regular intervals, because the variation in the Earth’s rotation speed varies irregularly. An example of such irregularities is the 2011 Japan earthquake, that increased the Earth’s rotation speed a bit.
If you’re thinking “what’s an extra second once in a while?”, and “why should anyone care about it?” – feel free to spend that extra second in a productive way 😉
A little extra thought can uncover the potential complexities entailed in such time manipulations.
How do banks and stock markets agree on exchange rates? If you make a deposit and a withdrawal, does the order matter? In a distributed compute cluster, how do compute nodes elect a leader? In cryptographic protocols, how do Alice and Bob verify that Eve isn’t tampering with their connection? How does a control tower in a busy airport is able to coordinate hundreds of incoming landings?
These examples, and many others, all rely on the ability to know the time, have a good estimate about the time on “other sides”, and being able to order events sequentially. Manipulating with time itself, in an irregular way, can cause a lot of chaos… It actually did cause chaos the previous time we experienced a leap second, back in 2012!
This is quite an interesting subject, and I encourage you to go deeper 🙂 .
If you decide to read just one more thing, let it be Google’s post on the subject, mentioning their elegant “smear window” solution. It’s pretty cool.