Unix epoch time explained: seconds, milliseconds and a worked example
By Hammad Rasool · November 16, 2026
Quick answer: a Unix epoch timestamp is the number of seconds that have passed since 00:00:00 UTC on 1 January 1970. 1700000000 means 1.7 billion seconds after that moment, which is 14 November 2023 at 22:13:20 UTC. If the number has 13 digits instead of 10, it counts milliseconds. To convert one without doing the arithmetic, paste it into the epoch converter.
How this was checked: every result on this page was produced on 16 November 2026 with Node.js 24.18.1, Python 3.12 and GNU date in Git Bash, and all three agree.
What is the Unix epoch?
The epoch is just a fixed starting line that computers agreed on: midnight UTC at the start of 1970. A timestamp is a distance from that line. 0 is the epoch itself, 86400 is exactly one day later, and negative values are dates before 1970.
Three properties make this format popular:
- No time zone. The number is the same everywhere on Earth. Time zones only come in when you turn it into a calendar date for a person to read.
- Easy maths. Sorting events, measuring how long something took, or checking whether a token has expired are plain number comparisons.
- No leap seconds. Unix time treats every day as exactly 86,400 seconds, so a timestamp always maps to one calendar time without a lookup table.
Seconds vs milliseconds
The most common mistake with epoch values is mixing up the unit. Some systems count seconds, others count milliseconds, and the only visible difference is three extra digits:
| Unit | Digits today | Same moment | Usually produced by |
|---|---|---|---|
| Seconds | 10 | 1700000000 | Unix tools (date +%s), PHP time(), Python time.time() (as a decimal), JWT exp and iat claims |
| Milliseconds | 13 | 1700000000000 | JavaScript Date.now(), Java System.currentTimeMillis(), many JSON APIs |
Every date from 9 September 2001 to 20 November 2286 has a 10-digit value in seconds, so counting digits is a reliable test for current data. Two symptoms give the mistake away: a date in January 1970 means a value in seconds was read as milliseconds (1700000000 ms is only 20 days after the epoch), and a date tens of thousands of years in the future means milliseconds were read as seconds.
Worked example: converting 1700000000
- Count the digits: 10, so the value is in seconds.
- Divide by 86,400 seconds per day: 1,700,000,000 / 86,400 = 19,675 whole days, with 80,000 seconds left over.
- 19,675 days after 1 January 1970 is 14 November 2023.
- 80,000 seconds is 22 hours, 13 minutes and 20 seconds, so the time is 22:13:20 UTC.
- For a local time, add your offset. In Pakistan (UTC+5) that is 03:13:20 on 15 November 2023.
The same conversion in code:
// seconds -> date (JavaScript works in milliseconds, so multiply by 1000)
new Date(1700000000 * 1000).toISOString(); // "2023-11-14T22:13:20.000Z"
// date -> seconds
Math.floor(Date.parse("2023-11-14T22:13:20Z") / 1000); // 1700000000from datetime import datetime, timezone
datetime.fromtimestamp(1700000000, tz=timezone.utc)
# datetime.datetime(2023, 11, 14, 22, 13, 20, tzinfo=datetime.timezone.utc)
int(datetime(2023, 11, 14, 22, 13, 20, tzinfo=timezone.utc).timestamp())
# 1700000000# GNU date (Linux, Git Bash)
date -u -d @1700000000 # Tue, Nov 14, 2023 10:13:20 PM
date -u -d "2023-11-14 22:13:20" +%s # 1700000000The year 2038 limit
Old systems store the timestamp as a signed 32-bit integer, whose largest value is 2147483647. That is 2038-01-19 03:14:07 UTC; one second later the counter overflows to a negative number. Modern 64-bit systems, JavaScript and Python don't have this limit, but it still matters for old databases, file formats and embedded devices.
Convert a timestamp now
The ToolStash epoch converter shows the current Unix time, reads 10-digit values as seconds and 13-digit values as milliseconds, accepts ISO 8601 dates, and gives you the UTC, local, ISO and relative time at once. It runs in your browser, so nothing you paste is uploaded.