Unix Epoch

From AMule Project FAQ
Revision as of 00:18, 10 March 2005 by 80.224.220.139 (Talk)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Summary

The Unix Epoch is a different and unique way to represent dates.

Description

This way of representing dates counts the seconds passed since the 1st of January 1970 at 00:00:00 in UTC (Greenwich timezone)

This date can be possitive (for dates after 1970-1-1) or negative (for dates before 1970-1-1).

The most interesting about this way of representing dates, is that dates are, for the first time, turned into numbers.

Utility

Because it counts seconds since a very specific date, this way of representing dates is unique.

The "normal" way of representing dates is unique in a strange way, since there are various time zones and the same date represents different dates in different countries.

Examples

Unix Epoch to Date conversion examples
Unix Epoch Date
252234223 Thu, 29 Dec 1977 10:03:43 +0100
1108486591 Tue, 15 Feb 2005 17:56:31 +0100
1101453443 Fri, 26 Nov 2004 08:17:23 +0100
0 Thu, 01 Jan 1970 01:00:00 +0100
-234234234 Mon, 30 Jul 1962 23:56:06 +0100
-1954864745 Tue, 21 Jan 1908 06:00:55 +0100

Notes

The Unix Epoch date is also called POSIX time or Unix time (or even simply Epoch).

It was defined as a 4-bytes integer, so it handles dates from 1901 to 2038 only. Nowadays it is being decided to move it to an 8 bytes integer, so it will be able to handle all the dates through the whole universe's life.

aMule uses Unix Epoch dates in clients.met file and server.met file amongst other places. So you might want to take a look there to get a better idea of the Unix Epoch concept.