A leap second is a one-second correction occasionally applied to Coordinated Universal Time (UTC) to keep it in step with the Earth’s actual rotation, which is slightly irregular and, on average, slowly slowing. Atomic clocks keep perfectly steady time, but the Earth does not, so the two drift apart. When the gap grows large enough, a leap second is inserted to realign them. The International Earth Rotation and Reference Systems Service (IERS) announces these decisions in its Bulletin C, which is “mailed every six months, either to announce a time step in UTC, or to confirm that there will be no time step at the next possible date.” The most recent bulletin states plainly that the difference between UTC and International Atomic Time has held at “UTC-TAI = -37 s” since 2017, the accumulated effect of past leap seconds.
The trouble for software is the form the insertion takes. A leap second is added at the very end of a chosen day, producing a minute that runs 23:59:58, 23:59:59, then 23:59:60 before rolling over to 00:00:00. That 23:59:60 is a legal UTC timestamp, but a great deal of code was written on the unstated assumption that a minute always has exactly sixty seconds, numbered 00 through 59. Code that assumes seconds never reach 60, that time always moves strictly forward, or that consecutive timestamps are always at least a second apart can mishandle the extra tick, returning errors, computing negative intervals, or, in the worst documented cases, spinning a server into a tight loop.
Because the operating system kernel and the Network Time Protocol (NTP) are the layers responsible for inserting the leap second into a running machine’s clock, bugs in their handling of it can ripple up into every application on the system at once. The leap second is announced months ahead by the IERS, yet that warning only helps if the software beneath an application actually applies the adjustment correctly.
The recurring fragility, combined with the fact that leap seconds arrive irregularly and cannot be scheduled far in advance, built support among timekeeping authorities for abolishing them. In 2022 the General Conference on Weights and Measures (CGPM) adopted Resolution 4, deciding that “the maximum value for the difference (UT1-UTC) will be increased in, or before, 2035.” In effect this lets UTC and the Earth drift further apart before any correction, removing the frequent one-second insertions that caused so much grief for computers.
The leap-second bug is therefore a case where the messiness of the physical world, an unevenly spinning planet, leaks into software through a shared clock and exposes assumptions that programmers never knew they had made. Its eventual resolution is being handled not by patching every program but by changing the definition of the time scale itself.