Calendar

Leap Seconds: The Tiny Clock Adjustments That Crashed Half the Internet

Leap seconds keep atomic clocks in sync with Earth's slowing rotation. They've also caused outages at Cloudflare, Reddit, and Qantas. Here's the full story.

DM
Dr. Meera Iyer

Astrophysicist

2026年1月25日·6 分で読める

Why Earth Needs a Correction

Atomic clocks are absurdly precise — the best cesium clocks lose about one second every 300 million years. Earth's rotation is not. Our planet is gradually slowing down, mostly due to tidal friction from the Moon. The result: the length of a solar day is getting longer by about 2.3 milliseconds per century.

This creates a problem. UTC (Coordinated Universal Time) is defined by atomic clocks, but we want it to stay synchronized with the Earth's rotation (UT1). When the difference between UTC and UT1 approaches 0.9 seconds, the International Earth Rotation and Reference Systems Service (IERS) announces a leap second.

The slowdown isn't smooth, either. Earth's rotational speed fluctuates due to ocean currents, atmospheric pressure changes, earthquakes, and even snow accumulation at the poles. The 2004 Indian Ocean earthquake shifted enough mass to shorten the day by about 2.68 microseconds. Glacial rebound — the land still rising after the last ice age ended 12,000 years ago — also affects rotation. So the IERS can't predict when the next leap second will be needed more than about six months out. They monitor the UT1-UTC difference continuously and issue Bulletin C every six months to announce whether a leap second will be inserted.

How Leap Seconds Work

A positive leap second inserts an extra second at the end of June 30 or December 31. The clock reads 23:59:59, then 23:59:60, then 00:00:00. That "60th second" is what breaks things.

Since 1972, there have been 27 leap seconds — all positive (adding a second). The last one was on December 31, 2016. Interestingly, Earth's rotation has been slightly speeding up in recent years, and there was talk of the first-ever negative leap second, though it hasn't been needed yet.

The mechanics of insertion are specific. Leap seconds are always applied at the end of a UTC month, and by convention only June 30 or December 31 are used (though technically March 31 and September 30 are allowed as secondary options). The IERS announces the decision at least six months in advance via Bulletin C. Every national metrology lab — NIST in the US, PTB in Germany, NPL in the UK — then coordinates to apply the second at exactly the same instant. In an era where nanosecond-precision trading happens on financial exchanges, that coordination is non-trivial.

The Famous Crashes

Leap seconds have a track record of causing outages:

  • Reddit (June 30, 2012) — The leap second triggered a bug in the Linux kernel's hrtimer subsystem, causing high CPU usage. Reddit, Mozilla, Foursquare, and Yelp all went down.
  • Cloudflare (January 1, 2017) — A negative value appeared in a duration calculation because the system received a timestamp from before the leap second was applied. DNS resolution was disrupted globally for some customers.
  • Qantas (June 30, 2012) — The airline's check-in system crashed, grounding flights for hours.

The common thread: software that assumes time is monotonically increasing, or that a minute always has 60 seconds, or that time differences are always positive.

The Linux kernel bug in 2012 is worth unpacking because it illustrates how subtle these failures are. The kernel's high-resolution timer subsystem (hrtimer) received a notification that the leap second had been applied. Due to a locking issue, this triggered a cascade of timer expirations, which caused the CPU scheduler to enter a busy-wait loop. The result was 100% CPU usage on affected systems with no useful work being done. A one-second time adjustment took down major websites for hours. The fix was a two-line patch to the kernel.

How Leap Smearing Works (And Why Tech Giants Use It)

The problem with an abrupt leap second — time suddenly reads 23:59:60 — is that most software has never seen a 61-second minute and doesn't handle it gracefully. Google's solution, first deployed for the 2008 leap second and later adopted by Amazon, Meta, and Microsoft, is "leap smearing": instead of inserting one full second at midnight, you spread it across a longer window by running the clock very slightly slower.

Google's implementation slows down its internal NTP servers by a tiny fraction over a 24-hour window centered on the leap second. Each second is 11.6 microseconds longer than a real second during that window. At the end of the 24 hours, the clocks have absorbed the extra second smoothly, and no software ever sees a :60 timestamp.

There's a catch, though. Different companies smear differently. Google smears over 24 hours. Amazon Web Services smears over 24 hours too, but the window and method have varied between leap second events. Bloomberg and financial exchanges generally don't smear — they apply the leap second abruptly because financial timestamps need to be traceable to TAI (International Atomic Time) for regulatory reasons. If your systems span multiple cloud providers or interact with financial infrastructure, you might be getting smeared time from some sources and non-smeared time from others. During the 2016 leap second, that mismatch caused some cross-cloud systems to report timestamps that were up to a second apart. Not catastrophic, but deeply confusing for debugging.

The 2035 Abolition Plan

In November 2022, the General Conference on Weights and Measures (CGPM) voted to abolish leap seconds by 2035. The plan is to let UTC gradually drift from UT1, with the gap potentially reaching a minute over several centuries. A long-term solution (like a "leap minute") would be decided later.

This is a big deal. Google, Amazon, and Meta have already been using "leap smearing" — spreading the extra second over a longer period (typically 24 hours) — to avoid the abrupt jump. Once leap seconds are officially gone, a whole class of bugs disappears with them.

Not everyone is happy about the decision, though. Astronomers and the navigation community have concerns. If UTC is allowed to drift from solar time, eventually it'll be noticeably out of sync with the sun's position in the sky. A minute of drift over centuries sounds small, but for celestial navigation and telescope pointing, that matters. The resolution left the details of the "maximum tolerance" unspecified — should UTC be allowed to drift by up to a minute? An hour? Nobody has agreed yet. The International Telecommunication Union (ITU) was supposed to finalize the tolerance by 2023 but hasn't done so as of early 2026.

UTC, TAI, GPS Time, and Why There Are So Many Timescales

The existence of leap seconds reveals that there isn't one universal "time" — there are several, and they don't always agree. TAI (International Atomic Time) is the raw output of the world's atomic clock network. It counts SI seconds without any corrections for Earth's rotation. As of early 2026, TAI is 37 seconds ahead of UTC (because 37 leap seconds have been applied since TAI and UTC diverged in 1972, though only 27 have been added — the initial offset was 10 seconds).

GPS time was set equal to UTC on January 6, 1980, when it launched. But GPS doesn't apply leap seconds — it just keeps counting. So GPS time is now 18 seconds ahead of UTC (the number of leap seconds added since 1980). Your phone's GPS receiver corrects for this automatically using data broadcast by the satellites, but a raw GPS timestamp will differ from UTC by those 18 seconds if you don't apply the correction.

This is the kind of detail that seems academic until you're debugging a system where one component uses GPS time and another uses NTP-synced UTC, and their timestamps disagree by exactly 18 seconds. I've seen that exact bug in fleet management systems.

Leap Second vs Leap Year

PropertyLeap SecondLeap Year
What it correctsDrift between atomic time and Earth's rotationDrift between calendar and Earth's orbit
How much is added1 second1 day (86,400 seconds)
FrequencyIrregular (0–2 per year)~Every 4 years
Decided byIERS (6 months' notice)Fixed algorithm
PredictableNoYes

Frequently Asked Questions

How often are leap seconds added?

There's no fixed schedule. The IERS monitors the difference between atomic time (UTC) and Earth's rotation (UT1), and announces a leap second when the gap approaches 0.9 seconds. Since 1972, there have been 27 leap seconds — an average of about one every two years, but none since December 2016.

Will leap seconds be abolished?

Yes. The CGPM voted in 2022 to eliminate leap seconds by 2035. After that, UTC will be allowed to drift slowly from solar time. The exact mechanism for any future large correction hasn't been decided yet.

What's the difference between a leap second and a leap year?

Leap years correct the calendar for Earth's orbital period (365.2422 days vs 365 days) by adding a day. Leap seconds correct clocks for Earth's rotational slowdown by adding a second to UTC. Leap years follow a fixed, predictable pattern. Leap seconds are irregular and announced only 6 months in advance.

When was the last leap second added?

The last leap second was added on December 31, 2016, at 23:59:60 UTC. As of 2026, no new leap seconds have been announced, and Earth's rotation has been slightly speeding up in recent years, reducing the need for further additions.

What is leap second smearing?

Leap second smearing spreads the extra second across a longer period (typically 24 hours) instead of inserting it all at once. Google, Amazon, and Meta use this approach to avoid the abrupt clock jump that has caused outages in the past. The clock runs very slightly slower or faster over the smearing window.

How many leap seconds have been added since 1972?

There have been 27 leap seconds since the system was introduced in 1972, all positive (adding a second). The frequency has been roughly one every two years on average, though the intervals are irregular and depend on Earth's rotational behavior.

Can there be a negative leap second?

Yes, in theory. A negative leap second would skip second 23:59:59, jumping directly from 23:59:58 to 00:00:00. It has never happened, but Earth's recent rotational speedup has raised the possibility. The planned abolition of leap seconds by 2035 may make the question moot.

Sources

  • IERS Bulletin C — Leap second announcements (iers.org)
  • CGPM Resolution 4 (2022) — "On the use of UTC"
  • Cloudflare blog — "How and why the leap second affected Cloudflare DNS" (2017)
  • John Graham-Cumming — "The leap second that crashed the Internet" (2012)

DM

著者について

Dr. Meera Iyer

Astrophysicist

Dr. Meera Iyer completed her PhD in Astrophysics and spent eight years working on precision timekeeping and solar observation. She has published over 30 peer-reviewed papers on astronomical time measurement, contributed to navigation satell

全プロフィールを読む →
ブログに戻る

関連記事