November 6, 2015

Leap Years, Leap Seconds, and Time Smearing


Have you ever wished you had more time? You do!

As we approach the end of 2016 you may recall this was a leap year. The calendar needs to be adjusted now and then to compensate for inaccuracies in the calendar itself, and variances in the Earth’s rotation. If we didn’t make these adjustments, the calendar would no longer match the seasons. January would eventually be in the summer in the northern hemisphere.

You probably learned all this in elementary school. Here’s what they didn’t teach you. Adding a day every 4 years (with a few exceptions) doesn’t quite match our Earth’s rotation. Every now and then a second needs to be added to the end of a year. Just one sixtieth of a minute, a lot more time than it’s taken you to read this entry so far. This is one of those years – the official arrival of the new year will be delayed by one second. Maybe we should count down from 11?

Let’s talk computers. They have enough trouble sorting out an extra day in February more or less every 4 years. What happens when there’s an extra second tacked on to December 31? How would you express this? Maybe 12/31/2016 11:59:60 pm?

For most of us it doesn’t really matter. Our home and office computers don’t need this kind of accuracy. But large servers that synchronize transactions between systems need to know exactly when things happen, and which entry is most recent. And how do you record a transaction that occurs during the leap second?

The solution is something called Time Smearing. Google, Amazon and other large server operators will intentionally slow their clocks by 0.0014% beginning 10 hours before the leap second continuing to 10 hours after. This causes each second to stretch just enough to cover the gap.

Enjoy the gift of a little extra time this year. And have a safe and happy new year!

Comments are closed.