Timestamp → date
Date → timestamp
Handy reference points
| Timestamp | Moment (UTC) |
|---|---|
| 0 | 1 Jan 1970 00:00:00 |
| 1,000,000,000 | 9 Sep 2001 01:46:40 |
| 1,700,000,000 | 14 Nov 2023 22:13:20 |
| 2,000,000,000 | 18 May 2033 03:33:20 |
| 2,147,483,647 | 19 Jan 2038 03:14:07 (32-bit limit) |
In code: Math.floor(Date.now() / 1000) (JavaScript), time.time() (Python), date +%s (shell).
Questions people ask
What is a Unix timestamp?
The number of seconds since 00:00:00 UTC on 1 January 1970 (the Unix epoch), not counting leap seconds. It is the same number everywhere in the world at a given instant, which is why computers store time this way.
Seconds or milliseconds?
Unix tools and most APIs use seconds (10 digits today). JavaScript, Java and many databases use milliseconds (13 digits). The converter detects which you pasted by its length.
What is the Year 2038 problem?
Systems that store the timestamp as a signed 32-bit integer overflow at 2,147,483,647 seconds, which is 03:14:07 UTC on 19 January 2038. Modern systems use 64-bit values.
Does the timestamp change with time zones?
No. The timestamp is always UTC-based; only the human-readable form depends on the time zone you display it in.