Why Computers Crash on New Year's Day and Canada Day
There’s 60 seconds in a minute, 60 minutes in an hour, 24 hours in a day, and 365 days in a year. Any fool knows that.
Except that it’s not true.
First of all, there’s leap years. If the year is divisible by four, than an extra day is added to the end of February. Most people know that.
Except that it’s not true.
If the year in question is the zeroth year of a new century, then it’s not a leap year. So 1700, 1800, 1900 weren’t leap years. Many people know that.
Except that it’s not true.
If the century part of the year is divisible by four, then the above rule doesn’t apply and it’s still a leap year. So 2000 and 2400 are leap years. Some people do not know that.
Therefore we had non-Y2K Y2K bugs in computer systems on February 29th 2000.
But we made a mistake even before we considered leap years.
Even less people know that there aren’t always 60 seconds in a minute: sometimes there are 61, and at some point in the future there might conceivably be 59.
Because the speed of rotation of the earth varies in response to climactic and geological events, the time system derived from this (Coordinated Universal Time – UTC) isn’t good enough for high precision calculations (think GPS, spacecraft, etc.) Instead time is defined in terms of International Atomic Time, a time scale derived by measuring the frequency of vibration of atoms in hundreds of atomic clocks.
What this means is that astronomical or clock time (the time most of us use) and atomic time (the time we measure) can drift out of sync. Every few years, on either 1 July or 1 January, a correction is made to keep the difference between the two small. An extra second is inserted (or possibly removed) just before the start of the day.
So if clock time is being used, extra care has to be taken with time calculations twice a year… which is why some major web sites failed when a leap second was introduced at the end of 30 June 2012.
So be prepared for computer problems on New Year’s Day (1 January), and Canada Day (1 July), as well as on February 29th and March 1st.
Notes.
- For more reading on the intricacies of time, and how various computer systems and protocols deal with it, a good introduction can be found here.
- All this may change in 2015. There’s a proposal to abolish leap seconds and replace them with leap hours which will be voted on at the ITU.