When you need this conversion
Reading log files, databases and API responses, debugging expiry times in tokens and cookies, and checking when a file or event was recorded.
Landmark timestamps
- 0: 1 January 1970, 00:00:00 UTC
- 1,000,000,000: 9 September 2001, 01:46:40 UTC
- 1,700,000,000: 14 November 2023, 22:13:20 UTC
- 1,790,000,000: 21 September 2026, 14:13:20 UTC
- 2,147,483,647: 19 January 2038, 03:14:07 UTC (32-bit limit)
Seconds or milliseconds?
Unix tools and most databases use seconds. JavaScript’s Date.now() and many APIs use milliseconds. The converter checks the length: 10 digits are seconds, 13 are milliseconds. Negative values are dates before 1970.
Getting a timestamp
- JavaScript: Math.floor(Date.now() / 1000)
- Python: int(time.time())
- Shell: date +%s
Common mistakes
Treating milliseconds as seconds. A 13-digit value read as seconds lands tens of thousands of years in the future.
Adding a time zone offset to the timestamp. Store UTC; apply the zone only when showing it.
To compare zones, use the time zone converter.