Eli5: What is a negative leap second?

217 views

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

In: 7

3 Answers

Anonymous 0 Comments

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.

You are viewing 1 out of 3 answers, click here to view all answers.