Important epoch events to keep in mind

The epoch time (aka the Unix time) is the number of seconds that have elapsed since January 1, 1970 UTC (the epoch). This concept has parallels in Java, since the Date class has a constructor that takes in the milliseconds since the epoch as well as methods to represent the date as the number of milliseconds since the epoch.

It turns out that on Friday we will pass the important milestone of 1234567890 seconds having passed since the epoch. I stumbled across a website that is counting up towards this moment.

In Java, this code snippet:

Date whatever = new Date(1234567890000L);

will produce the expected answer:

Fri Feb 13 18:31:30 EST 2009

Please keep this in mind on Friday night and celebrate accordingly.

(The other interesting epoch time fact is that it’s the root cause of the dreaded year 2038 problem. On January 13, 2038, all 32-bit Unix systems that calculate time with a signed 32-bit integer will “loop around” and cause all sort of headaches. Realistically, if you’re running a 32-bit system in 2038 then you’re probably living in a cave anyway and the bug really won’t affect your cave-dwelling lifestyle.)

It's only fair to share...
Share on FacebookGoogle+Tweet about this on TwitterShare on LinkedIn

Leave a Reply