Biz & IT —

Tonight’s leap second may cause problems for the Internet

Due to the Earth's slowing rotation, we have to pause the clocks for a second.

Tonight’s leap second may cause problems for the Internet

Tonight, at 23:59:59 on June 30, a leap second will be added to Coordinated Universal Time (UTC). Instead of the clock rolling around to 00:00:00 on July 1 as per usual, the time will actually jump to 23:59:60 before finally ending up in July a second later. The previous leap second, which was inserted in June 2012, caused a number of high-profile technological issues, and it's likely that the leap tonight will cause some problems as well.

Leap seconds are necessary because of the difference between civil time (i.e., the everyday time systems that pesky humans use) and the actual mean solar day (i.e. how fast the Earth rotates). In UTC, which is what other time zones are based on, a day is defined as 86400 SI seconds. How long the Earth actually takes to rotate on its axis is somewhat varied, however: for the past few centuries, the rotation of the Earth has been slowing, causing mean solar days to get ever so slightly longer.

In an attempt to ameliorate the artistic differences between UTC and Earth, the leap second system was introduced in 1972. Leap seconds can be inserted (or removed) at the end of June or December. There is no regularity in the system, though—nine seconds were inserted between 1972 and 1979, but only three seconds have been added since 2005—which is problematic in domains that demand regularity.

In computing, for example, leap seconds make it very difficult to know how many seconds have passed between two given dates, unless you keep an up-to-date record of all the previous leap seconds. For dates in the future, it's impossible, because we don't know when or if the IERS will decide to add or remove a second. It's somewhat comparable to the Y2K bug, though at least we knew with certainty when Y2K was going to land.

Cleaning the south face of the Westminster clock tower
Enlarge / Cleaning the south face of the Westminster clock tower

In June 2012, when the last leap second was applied, reddit crashed, Gawker went down, lots of Linux servers fell over, and Australian airline Qantas had some computer problems that caused up to 50 delayed flights. While it was sometimes a case of computer admins being caught with their pants down (i.e., old systems and packages that haven't been updated), it was also just the result of not enough corner case testing.

"Almost every time we have a leap second, we find something," Linus Torvalds told Wired back in 2012. "It’s really annoying, because it’s a classic case of code that is basically never run, and thus not tested by users under their normal conditions." The previous leap seconds were way back in 2008 and 2005.

Google's method of dealing with leap seconds is novel, but still not ideal. Called "leap smear," Google's servers will split the leap second into millisecond fragments, then smear them over the preceding day. NTP (network time protocol), which is used by almost all Internet-connected computers for time synchronisation, includes a number of features that help with leap second mitigation—but seemingly, given how so many servers crashed in 2012, there's still some issues to be worked out. The US stock markets are going for the old-school workaround: they're shutting down a few minutes before the scheduled leap second, just in case a system crashes and billions of dollars are sloughed off the market.

The leap second will occur at midnight UTC, which means it'll occur at different local times around the world: 5pm PDT, 8pm EDT, 1am BST, and 2am CEST. Hold onto your hats. Or at least your plane tickets.

Channel Ars Technica