Unix Timestamp Converter
Unix time counts seconds since 1 January 1970 UTC and ignores time zones entirely, which is exactly why it is used for storage and exactly why it confuses people reading it.
Timestamp or Date
Change either field — the other follows. Seconds and milliseconds are detected automatically.
Context
Unix time has no time zone
A Unix timestamp is a count of seconds since 1970-01-01T00:00:00Z. It is the same number everywhere on Earth at the same instant. A time zone only enters when you display it, which is why storing timestamps and formatting late is the standard advice: the number never needs fixing when a government changes daylight-saving rules, but a stored local string does.
Seconds or milliseconds?
Unix tools, databases and most APIs use seconds. JavaScript's Date.now() and Java's
System.currentTimeMillis() use milliseconds. Mixing them produces dates in 1970 (a
millisecond value read as seconds lands in the 1970s) or in the far future (the reverse). A quick
rule: a current timestamp in seconds is 10 digits; in milliseconds it is 13.
The year 2038 problem
A signed 32-bit integer overflows at 2,147,483,647 seconds, which is 03:14:07 UTC on
19 January 2038. Systems still using a 32-bit time_t will wrap to December 1901.
Modern 64-bit systems are fine for roughly 292 billion years, but embedded devices, old file
formats and some database columns remain exposed. The tool flags whether a value is still inside
the 32-bit range.
Leap seconds, and why Unix time pretends they do not exist
Unix time defines every day as exactly 86,400 seconds, so a leap second is handled by repeating or smearing a second rather than counting it. This means Unix time is not a true count of elapsed SI seconds since 1970 — it is off by the number of leap seconds inserted. For nearly all purposes this does not matter; for precision timing it does, which is why systems that care use TAI or a monotonic clock instead.
Frequently Asked Questions
What is the Unix epoch?
How do I tell seconds from milliseconds?
What happens in 2038?
Does Unix time account for leap seconds?
Sources
Official publications only. Links open the original document in a new tab.
- National Institute of Standards and Technology Time and Frequency Division Civil time and UTC
- National Institute of Standards and Technology Leap seconds FAQ Leap seconds and Unix time