

This yields a system that does not conform to the POSIX standard. In the theoretical case when a negative leap second occurs, no ambiguity is caused, but instead there is a range of Unix time numbers that do not refer to any point in UTC time at all.Ī Unix clock is often implemented with a different type of positive leap second handling associated with the Network Time Protocol (NTP). The Unix time number 1 483 142 400 is thus ambiguous: it can refer either to start of the leap second ( 23:59:60) or the end of it, one second later ( 00:00:00). Unix time numbers are repeated in the second immediately following a positive leap second. Unix time across midnight into 1 January 1999 (positive leap second) For example, this is what happened on strictly conforming POSIX.1 systems at the end of 1998:

During a positive leap second at the end of a day, which occurs about every year and a half on average, the Unix time number increases continuously into the next day during the leap second and then at the end of the leap second jumps back by 1 (returning to the start of the next day). No negative leap second has ever been declared, but if one were to be, then at the end of a day with a negative leap second, the Unix time number would jump up by 1 to the start of the next day. Leap seconds may be positive or negative. When a leap second occurs, the UTC day is not exactly 86 400 seconds long and the Unix time number (which always increases by exactly 86 400 each day) experiences a discontinuity. Unix time across midnight into 17 September 2004 (no leap second) For example, at the end of the day used in the examples above, the time representations progress as follows: On a normal UTC day, which has a duration of 86 400 seconds, the Unix time number changes in a continuous manner across midnight. Each leap second uses the timestamp of a second that immediately precedes or follows it. In Unix time, every day contains exactly 86 400 seconds. International Atomic Time (TAI), in which every day is precisely 86 400 seconds long, ignores solar time and gradually loses synchronization with the Earth's rotation at a rate of roughly one second per year. UTC includes leap seconds that adjust for the discrepancy between precise time, as measured by atomic clocks, and solar time, relating to the position of the earth in relation to the sun. Unix time differs from both Coordinated Universal Time (UTC) and International Atomic Time (TAI) in its handling of leap seconds. This can be misleading since Unix time is not the only time system based on an epoch and the Unix epoch is not the only epoch used by other time systems. Unix time is sometimes referred to as Epoch time. Every day in Unix time consists of exactly 86 400 seconds. For example, 00:00:00 UTC on 1 January 1969 is represented in Unix time as −31 536 000. Negative values, on systems that support them, indicate times before the Unix epoch, with the value decreasing by 1 for every non-leap second before the epoch. For example, 00:00:00 UTC on 1 January 1971 is represented in Unix time as 31 536 000. The Unix time 0 is exactly midnight UTC on 1 January 1970, with Unix time incrementing by 1 for every non-leap second after this. Unix time is typically encoded as a signed integer. Unix time is currently defined as the number of non-leap seconds which have passed since 00:00:00 UTC on Thursday, 1 January 1970, which is referred to as the Unix epoch.

It has come to be widely used in other computer operating systems, file systems, programming languages, and databases. Unix time originated as the system time of Unix operating systems. In modern computing, values are sometimes stored with higher granularity, such as microseconds or nanoseconds. It measures time by the number of seconds that have elapsed since 00:00:00 UTC on 1 January 1970, the Unix epoch, without adjustments made due to leap seconds. Unix time is a date and time representation widely used in computing. It was celebrated in Copenhagen, Denmark at a party held by the Danish UNIX User Group at 03:46:40 local time. (Unless the time difference is more that 50 days.T03:17:21+00:00 Unix time passed 1 000 000 000 seconds on. Overflow is never really an issue if you always calculate time difference.
