WorldClock.jp uses cookies for analytics and advertising. See About WorldClock.jp for details.

Skip to main content
WorldClock.jp

What Are Leap Seconds, and How Do Computers Handle Them?

How leap seconds correct for drift in Earth's rotation, when they are added to UTC, the trouble they cause computers, and why they are set to end by 2035.

Leap years are well known, but a shorter-scale adjustment called the "leap second" is much less familiar.

Why leap seconds are needed

UTC (Coordinated Universal Time; see also "What Is UTC?") is an extremely stable time standard based on atomic clocks. Earth's rotation speed, on the other hand, fluctuates very slightly due to tidal forces and other effects, and has a long-term tendency to slow down. A leap second is a one-second adjustment inserted as needed to keep the gap between "time as kept by atomic clocks" and "the length of a day based on Earth's actual rotation" from exceeding 0.9 seconds.

When leap seconds get inserted

The International Earth Rotation and Reference Systems Service (IERS) monitors Earth's rotation speed and, when it determines an adjustment is needed, inserts a leap second at the very end of June 30 or December 31 — as an otherwise nonexistent time of "23:59:60." Since leap seconds were introduced in 1972, dozens have been added, though the pace has slowed in recent years as Earth's rotation trends have shifted.

A persistent headache for computer systems

Leap seconds are notoriously awkward for many computer systems to handle. Unix timestamps (see also "Unix Timestamps and Their Relationship to Time Zones") are designed around the assumption of "a value that increases by exactly one second every second, with no gaps" — an assumption that breaks down the moment a leap second is inserted. There have been real, documented cases of systems experiencing clock rollbacks or freezes as a result. The 2012 leap second, for instance, caused outages at several major services including Reddit and Mozilla, and briefly took down the check-in system for the Australian airline Qantas.

An international agreement to phase them out by 2035

Because of the operational burden this creates, the 2022 General Conference on Weights and Measures (CGPM) reached international agreement on discontinuing leap second insertion by 2035. After that, a new mechanism is being considered to reconcile atomic-clock time with Earth's rotation over a longer cycle (on the order of a minute) instead. Eliminating leap seconds will be the first major revision to UTC's own definition since it was introduced in 1972. It's a reminder that even the infrastructure we never think about keeps getting quietly updated as the times change.

Related Guides