Categories
Google Software

Leap Smear

On how Google deals with leap seconds:

The solution we came up with came to be known as the “leap smear.” We modified our internal NTP servers to gradually add a couple of milliseconds to every update, varying over a time window before the moment when the leap second actually happens. This meant that when it became time to add an extra second at midnight, our clocks had already taken this into account, by skewing the time over the course of the day. All of our servers were then able to continue as normal with the new year, blissfully unaware that a leap second had just occurred.

Good idea. The second itself is meaningless. Spreading it out is much better/easier than accommodating for it in the rest of your stack.