The Fate of the Leap Second Hangs in the Balance
Many of the largest names in tech—including Meta—are rallying against the leap second. How can just one second affect operating systems?
Research scientists at Meta have taken a stance against the leap second and say that it should be eliminated.
Like the leap day, the leap second is a second that is added to our clocks every once in a while to make up for the imprecision that comes with the rotation of the Earth. Unlike the leap day, which occurs in regular intervals (every four years, a day is added to the calendar year: February 29), the leap second is added when the International Earth Rotation and Reference System Service (IERS) decides it is necessary.
Leap seconds applied to UTC since 1972. Image used courtesy of Meta
While the addition or removal of a second every few years may seem imperceptible to humans, for twenty-first-century computers, adding a leap second is a significant event that requires careful planning to mitigate negative impacts.
Just a Second
Currently, the atomic clock is considered the most precise method of timekeeping available, relying on a natural world phenomenon: the atomic resonance of cesium-133.
With the advent of the atomic clock in the 1950s and its improvements over time, the definition of a second can be defined as 9,192,631,770 vibrations of a cesium-133 atom. Over 100 million years accumulate about one second of error.
Atomic clocks the size of a coffee bean are the next generation of high-precision time-keeping devices. Image used courtesy of Hummon/the National Institute of Standards and Technology (NIST)
The Imprecision of Earth’s Rotation
So if atomic clocks are so accurate, why were leap seconds introduced in the first place?
The leap second appears to be a matter of keeping the Coordinate Universal Time (UTC) and Observed Solar Time (UT1) synchronized. The former tends to follow International Atomic Time (IAT) and the latter follows the observed passage of the Sun from the Earth. The current IERS policy is that this time drift between UTC and UT1 is no greater than 0.9 seconds.
A graph showing the delta drift between UTC and UT1. Image used courtesy of Wikimedia Commons
However, the Sun-Earth system tends to be an imprecise way to track time if we are trying to maintain accuracy at the resolution of seconds. The Earth’s rotation is not exact and changes (even if only slightly) from various natural occurrences: the rise and fall of tides, the disfiguration of the Earth’s shape, snow accumulating and melting on mountains or on the ice caps, and other geological events like earthquakes.
If a leap second isn’t introduced occasionally, the link between tracked time and the position of the Sun would drift, so noon would no longer be the moment of the day where the Sun is at its highest point over the horizon.
How Many Leap Seconds Have Been Introduced?
Leap seconds are injected either on June 30 or December 31 at 23:59. The first leap second was introduced on June 30, 1972, and was followed by another leap second that same year on December 31.
Since then, 27 leap seconds have been introduced in a non-uniform frequency. The last time there was a leap second was December 31, 2016.
A list of leap seconds where the first column is the epoch in seconds since January 1, 1900, the second column is the delta in seconds between IAT and UTC, and the last column is the date of the leap second. Image courtesy of the Internet Engineering Task Force
When the IERS has determined it’s time for a leap second, they announce it six months in advance to give the world a chance to prepare.
Smearing vs. Time Jump
After the announcement of an impending leap second, maintainers of impacted computer systems tend to take one of two strategies.
Smearing is when a new second is introduced over a long period of time. In Meta’s article, the company explains that it smears the time change over a period of 17 hours. The seconds in that period of time are either shortened or extended ever so slightly, so the end of the leap second day is synchronized with the new time.
A graph demonstrating how Meta implements time smearing. Image used courtesy of Meta
A discontinuous time jump, on the other hand, functions similarly to daylight savings time: a second either suddenly disappears or appears to either set time one second into the future or one second into the past at 23:59.
Negative Impacts of the Leap Second
Both of the above strategies require a non-trivial amount of effort to plan for and mitigate the consequences. As an example, a leap second can cause significant problems in financial systems that rely on accurate time stamps to verify the validity of a transaction. If a leap second is introduced as a discontinuous time jump into the future, or if the delta between the smeared time and the atomic time are too great, that transaction may be deemed invalid.
Some real-world impacts that occurred during the last introduction of a leap second include the outage of Reddit, Gawker, and Mozilla. All these systems synchronized their time using Network Time Protocol (NTP) servers via Linux libraries and kernels.
Meta specifically calls out a situation where the leap second is always assumed to be positive: when a second is only added and not subtracted. When testing time-keeping libraries and kernels in operating systems, there is a prevailing assumption that time can never go backward.
While the leap second has only been added, it is possible for the leap second to be removed instead. Since the leap second is introduced so irregularly—without a clearly-defined and uniform implementation plan and only six months in advance—it’s difficult to carefully plan for it.
A Series of Delayed Decisions
In 2005, a U.S. proposal first suggested eliminating the leap second. At the time, the IERS solicited comments on a proposal from the International Telecommunications Union (ITU) about implementing a leap hour instead of a leap second, with the first leap hour introduced in the year 2600. This change would make the leap hour a more uniform occurrence.
When a decision was made on whether or not to accept the proposal, the decision was postponed.
The last decision to consider the elimination of the leap second took place in 2015. Once again, the leap second remained in place with the plan to present a more detailed report to the ITU and relevant bodies in 2023. This 2023 report will include studies by organizations including the International Astronomical Union (IAU), the World Meteorological Organization (WMO), the International Bureau of Weights and Measurements (BIPM), and the International Union of Geodesy and Geophysics (IUGG), among others.
Rallying Against the Leap Second
One argument against the leap second and the synchronization of UTC and UT1 is that there are already other time standards that are not synchronized. This includes IAT and GPS time. As an alternative, some have proposed that different time standards be used depending on the application. For example, for astronomy, UT1 can be referenced instead of UTC.
In an era in which interconnected networks and computer systems play a critical role in our everyday lives, the arguments for and against the leap second seem more important than ever. In 2023, the decision to eliminate the leap second may finally come to a head at the next World Radiocommunication Conference.