A recent comment on my story about converting UNIX timestamps to Oracle dates prompted me to do a little extra digging on UNIX time.
UNIX time is a standard system used not only in UNIX but in many other modern computer systems. Instead of being divided into years, months, hours, minutes, etc. UNIX time is simply a number which represents the number of seconds which have passed since midnight Coordinated Universal time (UTC, the same time zone as Greenwich Mean Time, sometimes referred to as Zulu time), January 1, 1970. This date is often referred to as the UNIX epoch.
Sound like a lot of seconds? It is. At the time of this writing it has been 1,145,404,660 since the UNIX epoch, but since people like to think of dates the old fashioned way, in years, months, days, hours, minutes and seconds the computer is almost always nice enough to convert the UNIX time into the familiar date and time format, and to your local time zone.
One of the strengths of UNIX time is that when it is recorded (a point in UNIX time is typically referred to as a UNIX timestamp) it is always relative to Greenwich Mean Time. That means UNIX timestamps can be easily converted to different time zones with no ambiguity.
For all the gruesome details on UNIX time, Wikipedia has a typically thorough article on the topic.
While there are several sites on the web to convert a UNIX timestamp to human readable format and vice-verse be careful. Many sites will do the conversion based on their time zone. 4WebHelp.net provides a great page for converting both ways.
In contrast to UNIX time, Oracle Databases record time in a more traditional year, month, day, hour, minute, second manner. In order to convert Oracle dates to a different time zone you need to know what time zone the date was originally recorded in. Only recently has Oracle introduced a time datatype with a time zone attribute.
unix, time, timestamp, time zone, date, oracle, database, solaris, linux