What it is
A Unix timestamp is the number of seconds since 00:00:00 UTC on 1 January 1970, called the Unix epoch. It is the same number everywhere in the world at the same moment, which is why APIs, logs and databases use it. For example, 1700000000 is 14 November 2023 at 22:13:20 UTC.
Seconds or milliseconds?
A timestamp in seconds has 10 digits today. JavaScript, Java and many APIs use milliseconds, which have 13 digits. If a date comes out in 1970 or thousands of years in the future, the unit is probably wrong.
Convert it online
Paste it into the Unix Timestamp Converter. It detects seconds or milliseconds and shows the date in UTC and your own time zone.
In code and spreadsheets
- JavaScript:
new Date(1700000000 * 1000) - Python:
datetime.fromtimestamp(1700000000, tz=timezone.utc) - Excel or Google Sheets:
=A1/86400+DATE(1970,1,1), then format the cell as a date. The result is in UTC. - Mac or Linux terminal, current time:
date +%s
The year 2038 problem
Systems that store the timestamp as a signed 32-bit number run out on 19 January 2038 at 03:14:07 UTC. Modern systems use 64 bits, which lasts for billions of years.
Worked examples
0is 1 January 1970, 00:00:00 UTC.86400is exactly one day later, 2 January 1970.-86400is one day earlier, 31 December 1969. Negative timestamps are dates before 1970.2000000000is 18 May 2033, 03:33:20 UTC.
Common mistakes
- Thinking the timestamp has a time zone. It does not. 1700000000 is one instant everywhere; only the way it is displayed changes with the time zone.
- Making a timestamp from local time as if it were UTC. The result is off by your UTC offset, often by exactly a few hours. Check a known date after converting.
- Months in JavaScript.
new Date(2026, 0, 15)is 15 January: months count from 0. - Leap seconds. Unix time treats every day as exactly 86,400 seconds and ignores leap seconds, so it is not a count of every second that has elapsed.