What is a Unix timestamp?
A Unix timestamp (also called epoch time or POSIX time) counts the seconds since 00:00:00 UTC on 1 January 1970. Because it's a single number with no time zone, it's the easiest way to store and compare moments in databases, logs and APIs. 1790496000 is 27 September 2026, 08:00 UTC, everywhere in the world at once.
Seconds, milliseconds or more?
Different systems use different units, and mixing them up is a classic bug that puts dates in 1970 or the year 58,000. The converter decides by length:
| Digits (today) | Unit | Used by |
|---|---|---|
| 10 | Seconds | Unix, PostgreSQL extract(epoch …), JWT exp, most APIs |
| 13 | Milliseconds | JavaScript Date.now(), Java System.currentTimeMillis() |
| 16 | Microseconds | Python time.time_ns() // 1000, some databases |
| 19 | Nanoseconds | Go time.Now().UnixNano(), Java Instant |
Getting the current timestamp in code
- JavaScript:
Math.floor(Date.now() / 1000) - Java:
Instant.now().getEpochSecond() - Python:
int(time.time()) - Go:
time.Now().Unix() - PostgreSQL:
extract(epoch from now()); MySQL:UNIX_TIMESTAMP() - Shell:
date +%s, anddate -d @1790496000to convert back (GNU)
Time zones and daylight saving
The time zone converter uses the IANA time zone database built into your browser, so daylight-saving changes are applied for the date you choose, not just today. Times that fall outside 07:00–22:00 are marked as night, which helps when you're scheduling a call across countries. Some zones use half- or quarter-hour offsets, such as India (UTC+05:30) and Nepal (UTC+05:45); these are handled too.
The year 2038 problem
Systems that store timestamps as a signed 32-bit number can only count up to 2147483647, which is 19 January 2038 at 03:14:07 UTC. One second later they wrap around to 1901. Modern languages and databases use 64-bit values, but old embedded devices and some file formats still need checking.
Frequently asked questions
How do I convert a Unix timestamp to a date?
Paste it into the box above. The converter works out whether it is in seconds, milliseconds, microseconds or nanoseconds and shows the date in UTC, in your time zone and in any zone you choose, along with ISO 8601 and other formats.
Does a Unix timestamp include a time zone?
No. It always counts from midnight UTC on 1 January 1970, so the same number means the same instant everywhere. The time zone only matters when you display it as a local date and time.
Why does my date show 1970?
The timestamp is usually in the wrong unit: a value in seconds treated as milliseconds lands in January 1970. Check whether your system expects seconds (10 digits) or milliseconds (13 digits).
What is an Excel serial date?
Excel stores dates as the number of days since 30 December 1899, with the time as a fraction. The converter shows that number, and you can type excel 45000 to turn one back into a date.
Are leap seconds counted?
No. Unix time treats every day as exactly 86,400 seconds, so leap seconds are not counted. This matches how operating systems and programming languages handle it.