Date and time formats are vital in computer systems, but it is an area of remarkable shortsightedness. Y2K caused little disruption, but only because of a huge
investment in reprogramming (estimates vary but on the order of $20B). The POSIX time system, used in Unix systems and embedded in countless applications will
overflow in 2038.
Embedded systems often require accurate, high-resolution time-keeping and are difficult or impossible to revise after deployment.
Date/time formats are a tradeoff between three specifications: The required range of the time (underestimated in the examples above), the required resolution of the time and the resulting number of bits.
Below you will find a number of standard date/time formats for comparison. Edit one of the fields below and click "Calculate" to change all of the fields.
GMT (Greenwich Mean Time) has advantages as a time format. Keep time in GMT and convert to local time to avoid product localization and Daylight Savings Time issues.
Arbitrary time zone. Set date and time, plus offset from GMT. Or set the offset and calculate using one of the other fields to find the time in that zone. Offsets
are negative moving west from GMT (London) and positive moving east. Thus US time zones are negative offsets. Daylight savings reduces the offset by one hour.
ISO8601 is an international standard for date and time representations. It is ordered with the largest value on the left, hence year, month, day. This
resolves ambiguity about dates such as 2/3/4. (Feb. 3, 2004, March 2, 2004 or March 4, 2002?). It also defines a year-week number-day of week format. Time zones other than
GMT can be specified and the resolution can be extended to milliseconds.
POSIX or "Unix time" is the number of seconds since UTC January 1, 1970, not counting leap seconds.
The signed 32 bit implementation of the POSIX time system, used in Unix systems and embedded in countless applications, will overflow on 2038-01-19T3:14:08Z.
This number is stored as a 64-bit floating point number. This format is reasonably transportable and can be extended to 200 nsec resolution.
MS Windows' "GetSystemTimeAsFileTime" returns the number of 100 nsec tics since January 1, 1601 as a structure of two 32-bit numbers combined as a 64-bit integer.
This format will be good until 30828 AD, the scheduled date for the last Vista bug fix.
Julian Date is the days and fractions since noon January 1, 4714 BC (Julian calendar). It finds applications in astronomy and calendar calculations.
It requires at least 39 bits to store Julian Date to 1-second accuracy. Alternate forms of Julian Date include the Reduced Julian Date (RJD = JD − 2400000).