The Year 2038 problem (also known as Y2K38 or Y2.038K) refers to an integer overflow issue that affects computing systems storing timestamps as a 32-bit signed integer.
Why Does Overflow Happen?
A 32-bit signed integer has a maximum positive value of 2,147,483,647.
When expressed as seconds since January 1, 1970 00:00:00 UTC, this maximum integer is reached on:
Tuesday, January 19, 2038 at 03:14:07 UTC
One second later (03:14:08 UTC), the integer wraps around to -2,147,483,648, which represents December 13, 1901!
How Computing Systems are Fixing It
Modern operating systems, databases, and programming runtimes have transitioned to 64-bit signed integers (int64_t or time_t).
With a 64-bit integer, the maximum timestamp can store dates up to 292 billion years into the future—far exceeding the expected lifespan of our universe!