Guides / Developer basics
What Is a Unix Timestamp? Epoch Time Explained
A Unix timestamp counts the seconds since 1 January 1970 at 00:00 UTC. Computers use it because a single number is easy to store, compare and calculate with.
Examples
- 0 is 1 January 1970 at 00:00:00 UTC, the start of the epoch.
- 1,000,000,000 is 9 September 2001 at 01:46:40 UTC.
Seconds or milliseconds?
Many systems use seconds, but JavaScript and some databases use milliseconds. A millisecond value looks about a thousand times larger. If a date shows as the year 50000, the value is probably in milliseconds.
Time zones
A Unix timestamp is always in UTC, so it does not change with time zones. Convert it to local time only when you display it to a person.
The 2038 limit
Systems that store the timestamp in a signed 32-bit integer run out at 2,147,483,647, which is 19 January 2038 at 03:14:07 UTC. Modern systems use 64-bit numbers, which avoid the limit.
Try it yourself
The Unix Timestamp Converter turns a timestamp into a date and a date into a timestamp, with times shown in UTC.