If you’re a computer science student or find computer systems interesting, you’re probably familiar with the concept of Unix time – this being the time keeping method used by multiple operating systems to describe the seconds that have passed since Thursday 1st January 1970. This doesn’t count leap seconds (added due to Earth’s orbital wobble) but there’s only been 27 of them since 1972 so it’s not that big of a deal. You might be thinking, “That’s nice and all but why’s it interesting?”
It starts to get intriguing when you think how programmers will have dealt with this variable. Originally time values were stored as a 32-bit integer (232 or 32 ones and zeroes). Traditional Unix clocks will run out in the year 2038 making embedded systems in financial institutions and other awkward to upgrade places especially vulnerable. This has been called the Unix Millennium Bug. Many systems have been upgraded to allow for 64-bit integer time but fixing all systems is a slow process.
The Millennium Bug itself was caused by many system only using 2 digits to store years making the year 2000 indistinguishable from 1900. Other problems were caused by programmers misunderstanding that the year 2000 would, in fact, be a leap year. Thankfully, most computer systems were upgraded.
Many other such time keeping problems have been seen before and others are predicted to occur in the future and despite them seeming silly, they can have disastrous results. The Deep Impact spacecraft was reportedly lost in 2013 due to its clock reaching 232 tenths of seconds from 1st January 2000.
64-bit time will run out in the year 292,277,026,596 if we haven’t been cooked by the expansion of the Sun by then, so programmers of the future you know what you need to fix!
(Image courtesy of Chlor, image hosted on Wikipedia)