Unix Epoch

From JasonAntmanWiki
Jump to: navigation, search

For those of you who aren't familiar with the concept of the Unix epoch, what follows is a brief explanation:

When the Unix operating system was first programmed, it was decided that the OS would measure time in seconds from a past date - this date was set to January 1, 1970 at 00:00:00 UTC. In Unix (and many other areas, such as the NTP time protocol and the PHP programming language), time is referred to as a Unix Timestamp. This value is actually a data type known as time_t which is the value in seconds from the Unix epoch, as a 32-bit signed integer.

The inherent problem is that 32-bit signed integers can only represent values up to 231 or 2147483648. Measured in seconds from the Unix epoch, this maximum value falls on January 19, 2038 at 03:14:08 UTC. Therefore, unless the operating system, C libraries, and anything else that makes use of the time_t type (almost every program on a computer or network) is patched to use a 64-bit time_t... the world will stop spinning. Actually, the computer/program/service will overflow and start back at a time_t value of -1 in the best case but, more likely, come to a screeching halt.

For a more detailed description, you can read about the Year 2038 Problem on wikipedia.

Notice - this is a static HTML mirror of a previous MediaWiki installation. Pages are for historical reference only, and are greatly outdated (circa 2009).