You’ve probably heard of the Y2K bug. Meet its younger sibling: the Year 2038 problem.
Counting seconds
Many computer systems store time as “the number of seconds since 1 January 1970”, known as Unix time. On older systems, that number is stored in a signed 32-bit integer, which can only count up to 2,147,483,647.
That number of seconds runs out at 03:14:07 UTC on 19 January 2038. One second later, the counter overflows and wraps around to a large negative number, which those systems interpret as a date in December 1901.
Does this affect websites?
Mostly, modern systems have moved to 64-bit time, which can count far beyond the age of the universe. But old software, old databases, embedded devices and some file formats still use 32-bit time. And dates in the future can trigger the problem early: anything calculating “30 years from now” has been able to bump into 2038 for a while already.
Things that might care
- Expiry dates far in the future (cookies, certificates, subscriptions)
- Old PHP or database setups on 32-bit systems
- Devices in the “internet of things” that nobody will ever update
The good news: there are still years to fix it. The bad news: that’s exactly what everyone said about Y2K in 1988.
Source: Wikipedia – Year 2038 problem
