Unix time (also known as POSIX time or epoch time) is a system for describing instants in time, defined as the number of seconds that have elapsed since 00:00:00 Coordinated Universal Time (UTC), Thursday, 1 January 1970, not counting leap seconds. It is used widely in Unix-like and many other operating systems and file formats. Because it does not handle leap seconds, it is neither a linear representation of time nor a true representation of UTC. Unix time may be checked on most Unix systems by typing date +%s
on the command line.
The 32-bit representation of Unix time will end after the completion of 2,147,483,647( (231 - 1) seconds from the beginning(00:00:00 1 January 1970), i.e., on 19 January, 2038 03:14:08 GMT. This is referred to as the "Year 2038 problem" where the 32-bit Unix time will overflow and will take the actual count to negative.
Two layers of encoding make up Unix time. The first layer encodes a point in time as a scalar real number which represents the number of seconds that have passed since the beginning of 00:00:00 UTC Thursday 1, January 1970. The second layer encodes that number as a sequence of bits or decimal digits.
As is standard with UTC, this article labels days using the Gregorian calendar, and counts times within each day in hours, minutes, and seconds. Some of the examples also show International Atomic Time (TAI), another time scheme, which uses the same seconds and is displayed in the same format as UTC, but in which every day is exactly 86400 seconds long, gradually losing synchronization with the Earth's rotation at a rate of roughly one second per year.
Unix time is a single signed integer number which increments every second, without requiring the calculations to determine year, month, day of month, hour and minute required for intelligibility to humans. Modern Unix time is based on UTC, which counts time using SI seconds, and breaks up the span of time into days almost always 86,400 seconds long, but due to leap seconds occasionally 86,401 seconds. This extra second keeps the days synchronized with the rotation of the Earth, per Universal Time.