Leap Second
leap-second
A one-second adjustment applied to UTC to keep it aligned with the Earth's irregular rotation.
leap smear
Leap smear is a method for handling leap seconds without introducing the normally non-existent timestamp 23:59:60. Instead of inserting a sudden extra second, the adjustment is spread across a window of time by making each second very slightly longer. Google pioneered this approach in 2008, and it has since been adopted by major cloud providers including Amazon (AWS) and Microsoft (Azure).
In Google's implementation, each second within a 24-hour window (12 hours before and after the leap second) is lengthened by 1/86,400 of a second, approximately 11.6 microseconds. Over 86,400 seconds, these tiny additions sum to exactly one full second. During the smear window the system clock drifts up to 0.5 seconds from true UTC, but at no point does an anomalous 23:59:60 timestamp appear.
The start time and duration of the smear window differ among providers. Google and AWS both use a 24-hour smear, though their start times may not be identical. Some providers use shorter windows of 1 or 2 hours. When comparing timestamps across different cloud environments around a leap second event, discrepancies of up to one second can occur due to these differing smear schedules. After the planned abolition of leap seconds in 2035, leap smearing will become unnecessary.
Was this article helpful?
leap-second
A one-second adjustment applied to UTC to keep it aligned with the Earth's irregular rotation.
ntp
A networking protocol for clock synchronization between computer systems over packet-switched networks.
utc
The primary time standard by which the world regulates clocks and time, serving as the basis for civil timekeeping globally.
Leap years are not simply every fourth year. The Gregorian calendar uses a 400-year cycle with two exception rules to keep the calendar aligned with Earth's orbit. This article explains the astronomy behind the rules, the implementation pitfalls programmers face, and the looming year 4000 problem.
In 2022, the General Conference on Weights and Measures voted to phase out leap seconds by 2035. This article covers the gap between atomic time and astronomical time, why leap seconds break IT systems, and how leap smearing has buffered the issue until the formal abolition takes effect.