• 0

What is epoch time? Does Epoch Time differ with timezones?

What is an epoch?

In a computing context, an epoch is the date and time relative to which a computer’s clock and timestamp values are determined. The epoch traditionally corresponds to 0 hours, 0 minutes, and 0 seconds (00:00:00) Coordinated Universal Time (UTC) on a specific date, which varies from system to system. Most versions of Unix, for example, use January 1, 1970 as the epoch date; Windows uses January 1, 1601; Macintosh systems use January 1, 1904, and Digital Equipment Corporation’s Virtual Memory System (VMS) uses November 17, 1858.

The date and time in a computer is determined according to the number of seconds or clock ticks that have elapsed since the defined epoch for that computer or platform. This number is limited by the word length, and also by the number of clock ticks per second. In a 32-bit computer with 1 tick per second, for example, the clock will wrap around (that is, reach its maximum numerical time) on January 18, 2038. This is not likely to be a problem, because most computers are obsolete after a few years, and longer word lengths and/or new epochs will likely be defined before 2038. However, in a computer with 16 ticks per second, wrap-around can occur well within the useful lifetime of the machine.

Other ways “epoch” is used: In geology, an epoch is a period of time of variable length that is a portion of a period, which in turn is a fractional part of an era. We are currently in the Holocene epoch, which is part of the Quaternary period, which in turn is part of the Cenozoic era. In prediction of tides, an epoch is a period of 19 years, representing one complete cycle of all possible alignments of the sun and the moon. In astronomy, an epoch is the point in time where a calendar, or a defined time frame within a calendar, is considered to begin. In 1984, the International Astronomical Union decided that epoch 2000.0 would begin at 1200 UTC on January 1, 2000.

What is epoch time? Does Epoch Time differ with timezones?

Does Epoch Time differ with timezones?

This is one of the most interesting things about Unix time. Even though it’s based on a specific timezone (UTC), the Unix time itself is not timezone specific. So one server referring to a specific Unix time will be referring to exactly the same point in time as another server in a different timezone – for both of them the number of seconds elapsed since UTC will be the same.

It is a great question though, because Unix Epoch time is commonly converted back to human-friendly time and date stamps, which at that point become timezone specific. So if you decode Epoch time value on two servers in different timezones, you will end up with a different human-friendly timestamp.

pS: since you are here reading about how Epoch Time differs with timezones, check out this interesting military time converter.

Will there be an end of Epoch Time?

Apparently, current representation of Epoch time means some 32-bit implementations will have a problem similar to Y2K, only a bit later: sometime on January 19th, 2038. On that day, the time counter will reach its maximum value for a 32-bit signed number, meaning next valid value will have to be 0 – meaning both the end and the start of the Unix Epoch time.

This 2038 problem sounds like such a fascinating issue that I’ll have a separate post on it soon!

You may also like...

Leave a Reply

Your email address will not be published.