Why Computer Clocks Run Out of Seconds on 19 January 2038
At 03:14:07 UTC on 19 January 2038, a 32-bit Unix clock runs out of numbers and jumps back to 1901. Why it happens, what is already fixed, and the other rollovers ahead.
· 6 min read · Kodvi Journal

At 03:14:07 UTC on Tuesday, 19 January 2038, a counter inside many computers will reach 2,147,483,647. One second later, any machine that still keeps time in the old way will decide that it is 20:45:52 on Friday, 13 December 1901.
This is the Year 2038 problem. It is less famous than the millennium bug, and in some ways harder to see. It is also, as of December 2026, a little over 11 years away.
A clock that counts in seconds
Most computers do not store a date the way people write it. Unix, the operating system developed at Bell Labs around 1970, chose something simpler: a single number counting the seconds since midnight UTC on 1 January 1970. That moment is called the epoch. The POSIX standard, which defines how Unix-like systems behave, treats every day as exactly 86,400 seconds, so the count ignores leap seconds.
The idea spread far beyond Unix. Linux, macOS, Android, iOS, web servers, databases and file formats all use Unix time somewhere. At midnight UTC on 2 December 2026, the count stood at 1,796,169,600. You can turn any such number into a readable date, and back, with a Unix timestamp converter.
The trouble is the size of the box the number lives in. For decades, the standard C type for time, `time_t`, was a signed 32-bit integer on 32-bit systems. A signed 32-bit integer can hold values from −2,147,483,648 to 2,147,483,647, about 68 years either side of 1970. Add one to the maximum and the number wraps around to the most negative value. To the software, time suddenly runs backward by 136 years.
- 2,147,483,647
- the largest signed 32-bit number, reached at 03:14:07 UTC
- 19 Jan 2038
- the date a 32-bit Unix clock overflows
- 13 Dec 1901
- where it lands one second later
- 292 billion years
- the range of a 64-bit time counter, in both directions
What could break
On a modern 64-bit laptop or phone, almost nothing: those systems moved to 64-bit time long ago. The risk sits in places that are old, small or hard to update.
Embedded devices. Routers, industrial controllers, building systems, car electronics and countless other gadgets run on 32-bit processors, often with software that is rarely or never updated. Many are designed to work for 20 years or more. A device installed in 2020 may well still be running in 2038.
Data formats and file systems. Fixing the operating system is not enough if the date is stored on disk in 32 bits. In ext4, the default file system on many Linux systems, the basic timestamp fields are signed 32-bit seconds that overflow in January 2038. Inodes (the records that describe each file) larger than 128 bytes carry two extra bits, which push the limit to May 2446, but file systems formatted with 128-byte inodes keep the 2038 limit.
Databases. The MySQL `TIMESTAMP` column type, used in a great many websites and applications, is documented with a range of 1970-01-01 00:00:01 UTC to 2038-01-19 03:14:07 UTC.
Calculations about the future. Software does not have to wait for 2038 to fail. A program that computes an expiry date, a long-term schedule or a maturity date beyond January 2038 in 32-bit time can produce nonsense today.

What has already been done
The cure is simple to state: store time in 64 bits. A signed 64-bit counter of seconds will not overflow for about 292 billion years, roughly 20 times the age of the universe. Applying the cure everywhere is the hard part, because changing the size of `time_t` changes how programs and libraries talk to each other.
Some milestones:
- OpenBSD 5.5, released on 1 May 2014, switched to 64-bit `time_t` on every platform it supports. Where a 64-bit value could not fit, the developers used an unsigned 32-bit number instead, which lasts until 2106.
- Linux 5.6, released on 29 March 2020, was described by the developers leading the 2038 work as the first kernel that could serve as the base for a 32-bit system designed to run beyond 2038.
- glibc 2.34, the GNU C library, released in August 2021, lets programs on 32-bit systems choose 64-bit time by building with `_TIME_BITS=64` (together with 64-bit file offsets).
- Debian 13, released in 2025, uses a 64-bit `time_t` on every architecture except the legacy 32-bit PC port, i386, which was left as it was to keep old software running.
For systems that are maintained, the path to 2038 is now clear. For devices that nobody updates, it is not.
How it compares with Y2K
The millennium bug came from storing years as two digits, so that 2000 looked like 1900. It was visible in printouts and business software, and it had a fixed, famous deadline. The United States Department of Commerce estimated in 1999 that American governments and companies would spend about $100 billion on the problem between 1995 and 2001. When 1 January 2000 arrived, the serious failures that had been feared largely did not happen, partly because of that work.
The 2038 problem is different in two ways. It is buried in binary data and firmware rather than in readable text, so it is harder to audit. And it affects devices that were never meant to be patched. On the other hand, the fix is well understood and was built into mainstream systems more than a decade ahead of the deadline.
To the software, time suddenly runs backward by 136 years.
The other rollovers on the calendar
Any counter with a fixed number of bits eventually runs out. A few others are worth knowing.
GPS weeks. GPS satellites broadcast the current week number in a 10-bit field, which can count only up to 1,023. Every 19.7 years it rolls back to zero. That happened in August 1999 and again at 23:59:42 UTC on 6 April 2019; a receiver that was not prepared could jump back almost 20 years. Devices that rely only on the legacy civil signal can expect the next rollover on 20 November 2038. Newer GPS signals use a 13-bit week number that will last until 2137.

Network time. The Network Time Protocol, which keeps computer clocks in sync across the internet, counts seconds from 1 January 1900 in an unsigned 32-bit field. That count wraps at 06:28:16 UTC on 7 February 2036, starting what the standard calls era 1. The protocol was designed so that correctly written clients and servers can cope, as long as their clocks are already within 68 years of each other.
Unsigned Unix time. Systems that store Unix time as an unsigned 32-bit number avoid 2038 but hit their own limit at 06:28:15 UTC on 7 February 2106.
- 6 Apr 2019
- the last GPS week rollover, at 23:59:42 UTC
- 7 Feb 2036
- the Network Time Protocol starts its second era
- 20 Nov 2038
- the next rollover for legacy GPS receivers
- 7 Feb 2106
- unsigned 32-bit Unix time runs out
None of these dates means the world's computers will stop. Each one is a deadline for a particular kind of old code, in a particular kind of device. The 2038 deadline happens to be the biggest, and the clock on it is, quite literally, already running.


