"Leap smear", Google Public NTP
04/30/2024
From https://developers.google.com/time/smear
Since 2008, instead of applying leap seconds to our servers using clock steps, we have "smeared" the extra second across the hours before and after each leap. The leap smear applies to all Google services, including all our APIs.
A software library for managing this is "unsmear" which converts between smeared time and unsmeared time.
https://github.com/google/unsmear
This C++ library converts precisely between timestamps in the timescale of UTC with smeared leap seconds and the unsmeared TAI and GPS timescales.
This allows smeared time to be stored and distributed exclusively, then converted to and from other timescales in applications where the smear's 11.6 ppm frequency change is consequential. No parallel time distribution systems are required, nor is any mechanism necessary for a system to record what timescale its system clock is using.
The narrative notes that this works for both positive and negative leap seconds, and avoids steps or clock discontinuities.
Comments
You can follow this conversation by subscribing to the comment feed for this post.