Timestamp to Datetime (Timestamp Converter)
Convert Unix timestamps to dates and back. Seconds and milliseconds are told apart automatically, ISO 8601 strings paste in as they are, and any time zone shows the same instant.
About timestamps
Seconds or milliseconds
A Unix timestamp counts time elapsed since 1970-01-01 UTC. The catch is that the unit varies by language and system: C, Python and PostgreSQL use seconds, while JavaScript and Java use milliseconds. The number alone does not tell you which, but the digit count almost always does.
- 10 digits
1785328496— seconds, year 2026 - 13 digits
1785328496789— milliseconds, year 2026 - 16 digits
1785328496789000— microseconds, year 2026 - 19 digits
1785328496789000000— nanoseconds, year 2026
Read a 10-digit value as milliseconds and you land on 21 January 1970. If your result is near 1970, the unit is wrong.
A time zone is not an offset
+09:00 is an offset; Asia/Seoul is a time zone. An offset names a single difference at one moment, while a time zone is a rule set that includes daylight saving transitions and historical changes. Korea has no DST so the distinction stays hidden, but America/New_York moves between -05:00 and -04:00 with the seasons. Store the time zone name if you need to reconstruct local time faithfully later.
The year 2038
A second-precision timestamp in a signed 32-bit integer cannot go past 2038-01-19 03:14:07 UTC. One second later it wraps negative and reads as 1901. Moving to 64 bits fixes it, but the problem survives in legacy systems, embedded devices and some database column types.
Also worth knowing
- All conversion runs through the browser's
IntlAPI, using the operating system's time zone database. - Leap seconds are not represented in Unix timestamps.