Blog / Tech, New & Old /

Y2K: the bug that did not end the world

At midnight on 31 December 1999, a lot of people expected something to break. Planes falling out of the sky, banks losing money, power cuts, lifts stuck between floors. Newspapers ran countdowns. Some people stocked up on tinned food and bottled water.

Then the clocks struck twelve, and, for most people, nothing happened.

So was Y2K a hoax? Not really. It was a real problem, and the reason it felt like a non-event is that thousands of people spent years fixing it. That’s the story worth telling.

What the bug actually was

Early computers had very little memory and storage, and both were expensive. Programmers saved space wherever they could. One common shortcut was writing the year with two digits instead of four. 1985 became 85. 1999 became 99.

That works fine until the year rolls over. When 99 becomes 00, a computer might read it as 1900 instead of 2000. And dates are used for all sorts of things: calculating interest, checking whether a card has expired, working out someone’s age, scheduling maintenance, sorting records.

Think of a car’s mileage counter with five digits. At 99,999 the next click turns it back to 00,000. The counter isn’t broken; it just wasn’t built for that number. Y2K was the same idea, hidden in millions of lines of software.

Why people were worried

Computers had spread into nearly everything by the late 1990s: banking, payroll, airlines, utilities, hospitals, government records. Many of these ran on old software written decades earlier, and some on programming languages that fewer and fewer people knew.

Nobody could be sure which systems had the problem, and which were connected to which. Uncertainty is a perfect ingredient for panic. Add the dramatic name, the round-number date and headlines, and the fear spread faster than the facts.

There was also a second issue. Some software didn’t treat the year 2000 as a leap year correctly, because of a quirk in the leap-year rules. Years divisible by 100 are not leap years, unless they’re also divisible by 400, and 2000 qualifies. Programs that got that rule wrong could be off by a day in February.

What people did about it

This is the unglamorous part, and the important one.

Organisations ran huge projects to find, test and repair affected systems. The work included:

  1. Making an inventory of everything that used dates, including hardware with tiny built-in computers.
  2. Reading old code and expanding two-digit years to four, or using a windowing trick that treated, say, 00 to 29 as 2000s and the rest as 1900s.
  3. Testing by setting clocks forward in test environments to see what broke.
  4. Replacing systems that couldn’t be fixed.
  5. Writing contingency plans in case something failed anyway.

Governments set up coordination efforts, and companies reported spending large sums. The exact total is disputed, so I won’t quote a figure. But it was a major global effort, and many programmers were brought back from retirement to read code that had been written long before.

What happened on the night

Some things did go wrong. There were minor glitches: some systems displayed the wrong date, a few devices misbehaved, and certain records came out odd. But no widespread catastrophe followed.

Countries that spent less on preparation also saw few problems, which fuelled the argument that the threat was exaggerated. It’s a fair debate. Some of the fear was surely inflated by media and by consultants selling fixes. But a lot of the quiet was probably down to the actual repairs. It’s hard to prove either side, because you can’t re-run the world without the fix.

The lesson I’d keep

Boring maintenance prevents disasters, and when it works, nobody notices. That’s the paradox. If you fix a problem before it bites, it looks like there was never a problem.

If you run a website, you know this feeling. Nobody thanks you when the SSL certificate renews on time, the plugin update doesn’t break checkout, the backup restores, or the domain doesn’t lapse. They only notice when it fails. I wrote about this mindset in the system I use to manage several client websites, where renewal dates and backups were the first things I’d write down.

Other lessons that still apply:

  • Shortcuts have a shelf life. Saving two digits made sense in 1970. It was a problem decades later. Any quick workaround in your own systems might outlive the reason you made it.
  • Know what depends on what. Y2K was frightening because nobody had a full map of their systems.
  • Dates are surprisingly hard. Time zones, leap years, daylight saving and calendars have caused plenty of bugs since.
  • Panic and complacency are both mistakes. The sensible response was neither “we’re doomed” nor “it’s a hoax”, but “let’s check”.

A cousin of Y2K

The same type of problem will come again. Some systems store time in a fixed number of bits, which will overflow at a known future date. Engineers already talk about the 2038 problem for certain systems that count seconds in a 32-bit number. It’s a good example of a known issue that’s fixable if people do the work in time.

Myths

“Y2K was a hoax.” The bug was real; the fear of total collapse was overblown, and the quiet outcome owed a lot to the repair work.

“Nothing broke.” Minor things did.

“It only affected computers.” Embedded chips in equipment were part of the worry too.

Key takeaways

  • Y2K came from storing years as two digits.
  • The risk was real, but the apocalypse stories were exaggerated.
  • Huge amounts of unglamorous repair work made the night uneventful.
  • Boring maintenance is invisible when it works.
  • Similar date issues can come back.

What’s one dull maintenance job on your own website or devices that you keep putting off?