What happens when computers get the Leap Year wrong

 by Martin Belam, 29 February 2008

It is only once every 4 years I get to blog on February 29th, and fortunately, thanks to the modern miracles of Bytemark, Debian and Movable Type, the machine that publishes currybetdotnet knows that 2008 has an extra day. Getting a computer to realise that a year is a leap year is the kind of test often set to people studying programming, as it makes you think hard about catching all the exceptions.

Professionals don't always get it right, of course, and Leap Year bugs have caused disruption to computers in the past. When everyone woke on January 1st 2000 to find their toasters still toasted, planes still flew, and that the television still worked, the hype about the Millennium bug died down and people pretty much forgot about it.

Millennium bug logo

However, on February 29th 2000, some people still came a cropper, as not recognising that 2000 was a Leap year was also one of the problems with turn-of-the-century computer date management. This news article mentions problems experienced in Japan.

"Meteorological stations started spewing out erroneous data and 1,300 post office cash machines stopped working. Thousands of financial data terminals run by the Tokyo Stock Exchange also included errors".

The story was also covered by The Independent in the UK.

Incidentally, I note Amazon still sell Michael S. Hyatt's "The Millennium Bug - How to survive the Coming Chaos".

Millennium bug book

It was in the 1980s though that the most serious case of Leap Year computer disaster arose. A bug in the operating system used by Wang computers shut down virtually all of their machines worldwide. Wang used a file system that included an 'expiration' date, and files couldn't be deleted before they reached that date.

In 1984, a bug in the way that the Leap Year date was calculated meant that temporary files were being written on January 1st, but with an expiration date of January 2nd - meaning the operating system could not delete any of the temporary files it produced in the course of normal operations. Needless to say, without the ability to manage their own temporary files properly, the machines soon ground to a halt. There is a fuller account of the problem by Alex Papadimoulis over on The Daily WTF.

There is an absolute gem in the comments on that article as well:

"I felt pretty old when some young punk tried to delete a reference to Wang computers from a Wikipedia article, assuming it was vandalism".

1 Comment

That's numberwang!

Keep up to date on my new blog