How computers keep track of time, and why they might stop in 2038

How computers keep track of time, and why they might stop in 2038
Image: Intellect (generated)

In short: Computers do not experience time like humans. Instead, they rely on a system clock that counts ticks since an arbitrary starting point known as the epoch. While this simple mechanism powers everything from your phone to your microwave, it faces a looming technical crisis that could break legacy software.

At its core, system time is a numerical tally. Unix systems count seconds elapsed since 1 January 1970, while Windows systems often track 100-nanosecond intervals starting from 1 January 1601. These raw counts are converted into human-readable calendar dates by library subroutines, which must also navigate the complexities of time zones, daylight saving time, and leap seconds. This process is distinct from process time, which measures CPU cycles consumed by specific tasks rather than wall-clock time.

The architecture of these clocks is surprisingly mechanical. A programmable interval timer periodically interrupts the CPU, triggering a routine that increments a counter and performs housekeeping tasks. Early personal computers, such as those running CP/M or early Apple II models, often lacked this hardware entirely. It was not until the IBM AT that built-in, motherboard-level timekeeping became a standard feature for personal computing.

The reliance on fixed-width integers creates a significant vulnerability. Many systems store time as a 32-bit integer, which will overflow after its epoch limit is reached. This is the Year 2038 problem, a digital deadline that threatens to cause widespread software and hardware failures. Much like the Year 2000 bug, this requires proactive remediation, particularly for data file formats that rely on these 32-bit timestamps. As we move forward, the challenge lies in ensuring that our digital clocks remain synchronized and accurate without succumbing to the limitations of their own design.

Opens the Intellect+ feed with this card first. Swipe up for the next one.

Sources

To cite this card, link to https://intellectplus.co.uk/app/technology-system-time.

How we source, check and correct cards: Editorial standards.

General information, not professional advice. Spotted an error? Flag the card or see corrections and complaints.

Intellect Plus is a visual educational discovery platform for exploring fascinating facts and ideas. Brain Food, Not Brain Rot. What is Intellect Plus?

Related

Finding something worth knowing…