Computers Will Deal with 2016's Leap Second by "Smearing Time"

From Popular Mechanics

If you can't wait for 2016 to be over, I have some bad news; it's going to be a little bit longer than expected. In July of this year, the International Earth Rotation and Reference Systems Service (IERS)-which regulates the international clock-announced that 2016 will end in a leap second. An extra tick will be inserted into the year to make up for unpredictable variations to the Earth's rotation, and that means before we hop into 2017, the clock will strike an unusual 23:59:60.

Leap seconds are not particularly unusual. We had one back in the summer of 2015, and when everybody is ready for one, you hardly even notice that anything has happened. But these leap seconds do pose unique problems for timekeeping computers, which are unable to conceive of a 61st second by the very nature of their coding. In a way, it's a Y2K-esque problem. Simple math for a human, borderline brain-frying for a computer.

This is a particular problem for companies like Google, which run Network Time Protocol servers, internet clocks your laptop sets its watch to. The immediately obvious solution is to add an extra second to these servers, bam. But as Google points out in a blog post, that's not as easy as it sounds because most computers and operating systems don't understand a 61st second. In order for that to work, literally every device involved has to understand that something weird is going on and that's only happening this one time. In the past, attempting this solution has caused a number of real problems.

So Google came up with a different, extremely elegant plan. The weird part is that it will take 20 hours:

Instead of adding a single extra second to the end of the day, we'll run the clocks 0.0014% slower across the ten hours before and ten hours after the leap second, and "smear" the extra second across these twenty hours.

If you check the math you can see how this "smeared time" works:

20 hours = 1,200 minutes = 72,000 seconds 72,000 seconds x .000014 (.0014%) = 1.08 seconds

Though given that extra .08 second on there, it seems like the .0014% number is probably rounded, or altered in some other way.

This isn't a brand new idea. Google's first came up with it in 2008, and other companies in similar positions have tried variations, though the specifics vary. For the 2015 leap second, Amazon Web Services slowed its clocks by 1/86400 (.001157407%) for a day before the jump, smearing the extra second over the preceding 24 hours so its clocks would be one second slow at the time of the one-second jump. Another cloud company, Akamai, is doing the same thing this year, using a 24-hour smear.

Google's 20-hour smear is an outlier, but not due to any illusions that this method is superior. As Google's developer page notes, the choice is to make things easy on Google's existing infrastructure, and the company proposes that everyone adopt a standard noon-to-noon, 24-hour smear, with the leap second dead center, instead of on the end.

The end result? With any luck you won't notice a damn thing. But when you're watching the clock tick down to the first second of 2017, take a moment to appreciate all the math that's being put to work to give you that precious little quantifiable illusion we call time.

You Might Also Like