Eli5: What is a negative leap second?


And why do they say it will wreck havoc on IT systems?

In: 7

Leap seconds is our solution to the problem that the Earth does not rotate at a constant rate. There are slight variations over time and we need to account for that in order to make the clock and the earths rotation lined up. So we add or subtract a second from the clock every once in a while.

The problem for computers is that most programs are written under the assumption that time is linear. So when it is not there are lots of different bugs which might creep in to the system. For example if you are calculating the rate that something changes, for example if you are counting the cycles in the power grid and want to know the frequency, the simple way to do this is to take a sample, note the time, then wait, take another sample and the time then divide the difference in the samples with the difference in the time. However if there were a leap second in there the times would be wrong and the frequency would be wrong. So you might end up crashing the power grid because you could not calculate the right frequency.

Another problem is if you want something to happen once a second you might take the current time, add a second, and then tell the system to wake you up at this time. However if you happen to land on a leap second then that time may never arrive or it might arrive twice waking you up twice. And this is not what you expected so the code would normally not handle this.

There are a few ways to fix this. The easiest would be to just not do leap seconds. There is really no good reason to do it and it tends to create more problems then it is worth. The decision is kind of more political within the scientific communities as the decision falls on institutes comprised of time buffs and astronomers who would prefer if the clock syncs up with the rotation of the earth at all times.

The Earth’s rotation isn’t as constant as atomic clocks are so the time sometimes needs correcting to keep it in step. Usually the rotation is slowing down mostly due to the tidal effects of the Moon so a leap second needs to be added to UTC to make the by that match with the heavens. Lest year, however, was short so they need to take one away.

Just the same as when summer time ends and the clicks go back an hour and 2 AM becomes 1 AM for the second time that night, removing a second will mean that there are two times a second apart when the clock shows the same digits. Its a very unusual, if not unique, situation and if systems aren’t prepared for that, unforseen side effects could occur.

A leap second is just that: A second.

Why is it implemented? Because an entire evolution around the sun does not take exactly 365 days.

Why in increments of seconds, instead of years like on the calendar? Because we have the technology to do it on a effectively continous scale.

Why subtract the leap second? Heck if I know, the whole thing about leap seconds/minutes/hours/days/weeks/years is that they’re added onto the whole thing.

Why would it wreak havoc on IT systems? Because those system’s internal clock dictates their functioning, and the clock for the problematic systems was built without real-time leap updates in mind.