How the heck do you even add a leap second to the year?

The intricate system working to make your New Year’s Eve a little longer
Djim Loic

Share

There will be an extra second in 2016, and people are not happy about it. Neither is your computer. This year’s (or next year’s, if you’re in most of the Eastern Hemisphere) extra second will probably have little to no effect on you, unless you count the relentless jokes about this terrible year lasting one second longer. You probably won’t even notice that it’s happening, much less realize how. But somehow, every computer and phone in the world will know to add exactly one second to the clock. And that can get a little complicated.

The world keeps track of time in a bunch of different ways, many of them completely irrelevant to most people. The overarching standard that computers synchronize to is called Coordinated Universal Time. It’s (confusingly) abbreviated as UTC, which doesn’t really stand for anything. This is the result of a compromise between the U.S. and France, who wanted to call it CUT and TUC respectively so the acronym would make sense in their own languages. Instead, we have UTC. This feels like a metaphor for something.

Anyway, internet-connected computers all over the world synchronize to UTC through a process called network time protocol. Basically, sets of ultra-precise atomic clocks placed at strategic points around the globe keep the most accurate time we’re capable of keeping. Those reference clocks tell a set of computers what time it is every second to maintain a reference time. Periodically, another set of computers asks the reference computers what time it is. Those computers tell the next set of computers what time it is, and so on until the correct time propagates throughout the entire internet. They can also all check with each other to make the system as fast as possible, thus keeping every single computer in sync. Your computer is checking the UTC periodically using this network time protocol, even though you don’t notice it.

UTC itself has been in place since January 1, 1960 in some form, and has been adjusted several times for accuracy. Leap seconds were added to the mix in 1972, much to the later chagrin of computer programmers everywhere.

We add extra time to certain years to keep our clocks precisely in line with solar time. Because Earth’s rate of rotation is slowing down, we have to keep adding seconds. Since the Earth doesn’t slow down at a rate of exactly one second per year, we don’t add leap seconds each year or even at regular intervals (like we do for leap years). We add leap seconds whenever The Powers That Be determine that we’re in danger of having the difference between UTC and solar time grow longer than 0.9 seconds. The Powers That Be are more (or probably less) commonly known as the International Earth Rotation and Reference Systems Service. The IERS has added 26 leap seconds so far, not including the one that will happen this year, through an oddly antiquated system.

Six months in advance of every leap second, the IERS sends out a bulletin creatively titled Bulletin C, stating the intention to add a leap second. The bulletin gets broadcast across radio waves, GPS signals, and even telephone modems to tell every time-keeping system that there will be an extra second that year. The laboratories that operate atomic clocks have to manually adjust them, but almost every computer in the world just downloads a file from the network time protocol. That file contains instructions for the computer to add another second at 11:59:59 pm.

IERS Bulletin C
This year’s Bulletin C Screenshot from IERS website by author

Adding seconds to some years but not to others isn’t really a problem for humans, but it is for computers. Leap years can be programmed into the timekeeping system in advance. Leap seconds can’t. And that means that the IERS has to be able to tell every single computer in the world to add one extra second on one particular day. That does not jive with how computers tell time. Computers are programmed to know that there are exactly 60 seconds in a minute, and you cannot convince them otherwise. You can’t just suddenly create a second second after 11:59:59pm on December 31, 2016. And yet we persist.

The leap second in summer 2012 caused several massive servers to go down because of a mismatch between clocks. A similar problem occurred in 2009. The mismatch in time happens because network time protocol doesn’t have a good way of understanding a minute that contains 61 seconds. The main fix right now is to pause the timer, such that the final second of December 31st actually lasts for two seconds. That workaround keeps a computer from having to turn itself backwards by one second, which is helpful because computers understand time as moving forward at a constant rate. Some other systems simply repeat the last second of December 31st. But neither system is optimal.

A better system is probably the one Google is implementing publicly this year. They call it “smearing.” Instead of adding a second right at 11:59:59, they smear the extra second across many hours. Their network time protocol is going to run 0.0014 percent slower for the 10 hours before and 10 hours after the leap second. That’s such a small change that it’s effectively unnoticeable, and makes the adjustment easier on computers.

If you’re in the U.S. this New Year’s Eve, your computer will be updated based on the master clock facility at the U.S. Naval Observatory in Washington D.C. A fleet of atomic clocks there keep the precise time and sends it out over a network time protocol on the internet. Charmingly, it also sends it out over the telephone system. The old-timey voice of actor Fred Covington, who you’ve probably never heard of, announces the time over a background of one second ticking intervals. Just call +1 (202) 762-1401. You’ll feel awfully old-fashioned, but you’ll be ever so up-to-date.

 

Win the Holidays with PopSci's Gift Guides

Shopping for, well, anyone? The PopSci team’s holiday gift recommendations mean you’ll never need to buy another last-minute gift card.