At 11:59:60 PM, Servers Around the World Panicked. The Single Extra Second That Crashed Reddit in 2012.
At midnight Greenwich Mean Time on July 1, 2012, an extra second was inserted into the world's official timekeeping system. 11:59:59 was followed by 11:59:60, and then midnight arrived. The Linux kernel, running on servers at Reddit, Mozilla, LinkedIn, Gawker, FourSquare, Yelp, and airlines running the Amadeus reservation system, encountered a situation its timer subsystem had not handled correctly. Processes that relied on high-resolution timing began looping in a busy-wait state, consuming 100 percent of CPU. Reddit went offline for roughly ninety minutes. The cause was a single extra second in the year's timekeeping.
A second, defined since 1967 by the 13th General Conference on Weights and Measures as exactly 9,192,631,770 oscillations of the cesium-133 atom, is extraordinarily precise. It does not drift. It does not vary with temperature. It is the same duration in Tokyo as in London, and it will be the same duration in 2050 as in 1970.
The problem is that the Earth is not as precise as a cesium atom. The gap between physical time and astronomical time, between how we measure seconds and how long the planet actually takes to rotate, is what produced the 2012 outages. Understanding why that gap exists, and what engineers have built to cope with it, reveals how much complexity hides beneath the surface of something as ordinary as converting between seconds, minutes, hours, and days.
How Official Timekeeping Arrived at the Atomic Second
Before atomic clocks, the second was defined astronomically. It was one 86,400th of a mean solar day, the average time between successive solar noons across the year. This definition worked well for centuries, but it had a practical flaw: it tied the unit of time to the rotation of the Earth, which is not perfectly consistent.
By the early twentieth century, the most precise pendulum and quartz clocks were accurate enough to detect small variations in Earth's rotation. The planet slows slightly and speeds slightly depending on atmospheric pressure, ocean currents, seismic activity, and the long-term drag of lunar tidal forces. A second defined by Earth's rotation was, in principle, a slightly different length each year.
Atomic physics offered a solution. In 1955, Louis Essen at the National Physical Laboratory in England measured the cesium-133 resonance frequency with enough precision to define a second that never varied. In 1967, the 13th General Conference on Weights and Measures adopted this definition formally, replacing the astronomical second with an atomic one. The cesium second became the SI second.
This created a new problem: two time systems now existed. International Atomic Time, called TAI, accumulated seconds with perfect precision. Universal time, based on Earth's rotation, drifted slightly relative to TAI. Without a bridge between them, clocks synchronized to TAI would eventually show noon at 2 AM, because the atomic clock runs imperceptibly faster than the planet it sits on.
The Invention of the Leap Second
The solution adopted in 1972 was Coordinated Universal Time, or UTC. The concept of the leap second was proposed independently by G. M. R. Winkler of the US Naval Observatory and Louis Essen in 1968. The system was approved in 1970 and implemented on January 1, 1972. UTC uses the same second as TAI but inserts leap seconds periodically to stay within 0.9 seconds of astronomical time.
The International Earth Rotation and Reference Systems Service, a technical organization based in Paris, monitors the difference between UTC and the actual rotation of the Earth. When the gap approaches 0.9 seconds, the IERS announces a leap second several months in advance, and on the specified date, UTC clocks show 23:59:60 before rolling over to midnight. Between 1972 and 2016, 27 leap seconds were added. All were positive, meaning time paused for an extra tick, reflecting the long-term slowing of Earth's rotation.
What the Leap Second Did to Linux Servers in 2012
The insertion of a leap second requires that some moment contain 61 seconds instead of 60. Most timekeeping software was designed assuming that minutes always contain exactly 60 seconds. The Linux kernel bug in 2012 was specifically in the hrtimer subsystem, which handles high-resolution timer events.
When the kernel was notified that a leap second had occurred, the hrtimer's internal reference time moved forward by one second while the system clock was simultaneously stepped back by one second to accommodate the extra tick. This created a one-second discrepancy between what the timer expected and what the clock reported. Sub-second hrtimer events began firing immediately as soon as they were queued, because from the timer's perspective they were already overdue. Processes that created timers in a loop found themselves spinning continuously. CPU utilization hit 100 percent and stayed there until the affected servers were restarted.
The Amadeus Altea airline reservation system was among the most operationally significant casualties. Amadeus runs on Linux clusters and handles check-in and boarding for dozens of major airlines. Several carriers reported that airport check-in systems went offline during the early hours of July 1, 2012, across European airports. For Reddit, the outage lasted approximately ninety minutes before engineers identified the cause and restarted enough servers to restore service.
How Google and Amazon Avoided the Problem
Google did not wait for the leap second. In a post-mortem published after the 2012 event, Google's Site Reliability Engineering team described their approach: rather than allowing NTP servers to insert the full second at once, they distributed it gradually over the 20 hours surrounding midnight. Their NTP servers adjusted the rate of time flow by tiny amounts, so that by the time the official leap second arrived, their clocks had already absorbed it. No process on Google's infrastructure ever saw a clock that jumped backward or a minute with 61 seconds.
Amazon Web Services adopted the same strategy after 2012. The practice, known as leap smearing, is now documented as an option in most major NTP implementations, including chrony and ntpd. The Linux kernel was patched to handle leap seconds correctly, but many production systems were still running older kernels in 2012.
In November 2022, the Bureau International des Poids et Mesures voted to stop inserting leap seconds entirely by 2035. The accumulated difference between atomic time and solar time will then grow uncorrected until it reaches a threshold that requires a larger correction, the details of which remain undecided. The vote reflected a consensus among infrastructure operators that modern systems assume time is monotonically increasing, and that a periodic backward step or pause, however brief, creates failure modes that are difficult to test for and predict.
Time Units, Conversions, and Why 86,400 Is Not Always Exact
The standard time unit conversions are well defined. One minute is 60 seconds. One hour is 3,600 seconds. One day is 86,400 seconds. One week is 604,800 seconds. One Julian year, the basis for most astronomical calculations, is 365.25 days, or 31,557,600 seconds.
These conversions are precise for ordinary purposes. They become complicated at the edges. A civil day is exactly 86,400 SI seconds on most days, but on a leap second day it is 86,401. Software that converts between seconds and days by dividing by 86,400 produces a result that is off by one second on those dates, which may or may not matter depending on the application.
Unix time, the format used by most operating systems and programming languages, counts seconds since January 1, 1970 at midnight UTC. It does not represent leap seconds: leap second days in Unix time contain only 86,400 seconds, the same as any other day. The 27 leap seconds inserted since 1972 are not visible in Unix timestamps. Applications that need to know the exact number of SI seconds between two moments in real time must use TAI or a table of leap seconds, not Unix time.
Conclusion
Converting hours to seconds to days is a straightforward calculation for most practical purposes. The history behind why those units sometimes disagree at the millisecond level is a 70-year project in applied physics and international standards, with production outages as some of its more memorable validation events.
ToolHQ's Time Converter handles conversions between seconds, minutes, hours, days, weeks, and years for the common cases where the question is simply how many of one unit fit inside another.
Frequently Asked Questions
What is a leap second?
A leap second is an extra second added to UTC to keep it within 0.9 seconds of astronomical time. Because Earth's rotation is gradually slowing, atomic clocks run slightly ahead of solar time and need periodic correction. 27 leap seconds were added between 1972 and 2016.
Why are leap seconds being discontinued?
Modern software assumes time is monotonically increasing. A leap second inserts a repeated or extra moment that violates this assumption and can cause bugs. The Bureau International des Poids et Mesures voted in 2022 to end leap seconds by 2035.
What is leap smearing?
Leap smearing is the practice of distributing a leap second gradually over a period of hours instead of inserting it all at once. Google and Amazon developed this approach to avoid the clock discontinuity that caused production outages in 2012.