Finding something worth knowing…

Technology

At 03:14:07 on 19 January 2038, some computers will think it is 1901.

Many systems count time as seconds since 1 January 1970, stored in a signed 32-bit number. That number runs out at 03:14:08 UTC on 19 January 2038, when it flips negative and the date jumps back to December 1901. It is Y2K's binary sequel, and it has already caused failures.

Unix time is a simple, widely used standard: the number of seconds since midnight UTC on 1 January 1970, ignoring leap seconds. For decades it was typically stored as a signed 32-bit integer, which can hold values up to 2,147,483,647. Add one more second and the number overflows, flipping the sign bit. The system then reads the time as 2,147,483,648 seconds before 1970, which is 20:45:52 UTC on 13 December 1901.

Y2K came from storing years in two decimal digits; this comes from storing seconds in a fixed-width binary number. The most vulnerable systems are those rarely or never updated, especially embedded computers that are built to last as long as the machine they sit in, from cars' braking and stability systems to routers and cameras. Many embedded systems do not care about the date at all, and those that only measure time differences are largely safe.

The bug is already showing up in software that calculates future dates. In 2006, AOLserver set a default timeout of one billion seconds for requests; once that pushed deadlines past January 2038, calculations overflowed and the software crashed. In 2022, a Microsoft Exchange update numbered in a date-like format was converted into a number larger than the 32-bit limit, breaking its anti-malware engine until a fix arrived days later.

There is no single fix. Switching to an unsigned 32-bit number buys time until 2106 but breaks dates before 1970. The standard solution is a signed 64-bit count, which will not overflow for about 292 billion years, roughly 21 times the current age of the universe. The hard part, as with Y2K, is finding every old system that still needs changing.

Source: Wikipedia — Year 2038 problem · Text summarised from Wikipedia (CC BY-SA 4.0)

Related

More in Technology · All topics