Happy 1,500,000,000 Unix time everyone! Or not?

1,500,000,000 seconds have passed since January 1, 1970 0:00:00 UTC today... 1.5 billion, that's a whole lot of seconds! I think only real nerds like me will celebrate this party? ;-)

UNIX Timestamp

When you open a linux terminal and enter 'date +%s' your system gives the current Unix Timestamp. The Unix Timestamp is a ten digit number which counts the number of seconds that have passed since 00:00:00 UTC on 1 January 1970 (the epoch). This 32-bit signed integer is used in many operating systems to track the time. It can easily be used to represent all time zones at once.

The Year 2038 problem

If you ever had to be scared of a number, this is the number you need tot be frightened of: 2,147,483,647. Why this number? Well, it's the maximum 32-bit signed integer, meaning once it goes past this number it can't count it anymore. When it happens we call it an 'integer overflow', which means the counter begins reporting a negative number (in case of a signed integer).

So the Unix Timestamp will run out of 32-bit numbers on January 19th, 2038 at 03:14:07 UTC time. One single second after that time, computers running 32 bit software will not be able to tell the difference between the year 2038 and 1970 anymore. The negative number reverts the date back to December 13, 1901.

For those still using 32 bit computers or software... It's only about 21 more years before your world ends.

The Unix Epoch-alypse

If you are using a 64-bit Windows computer you might think this won't affect you, but the problem affects all Unix operating systems, which powers all Android and Apple devices, as well as most internet servers.
Any computer, smartphone, software program, server or even cars running a 32-bit system could fail in 2038, unless they are patched and upgraded in advance.

Android

I tried my Android phone, but it's not possible on my phone to set the date to a value after 2037. I've read about older Android devices that even crashed if you would try it. See this picture:

Solution?

There is no universal solution for the Year 2038 problem yet.
Changing the timestamp to an unsigned 32-bit integer, which would extend the range to the year 2106, could result in code compatibility problems in programs that use dates prior to 1970, as such dates are represented by a negative number.
The only real solution is to upgrade all hardware and software to 64-bit systems.

There's still 21 years left, but planning the change far enough in advance should remove most big problems.


¯\___(ツ)____/¯ Don't miss out on my next post! Follow me @penguinpablo

H2
H3
H4
3 columns
2 columns
1 column
24 Comments