Formula
Unix time = seconds elapsed since 1970-01-01 00:00:00 UTCmilliseconds = seconds × 1000 How it works
Unix time counts the seconds since the "epoch", midnight UTC on 1 January 1970, ignoring leap seconds. It is the same number everywhere on Earth at a given moment, which makes it the standard way to store and exchange times in databases, APIs and log files.
Different systems use different precisions. Unix shells, PHP and most databases use seconds (10 digits for current dates); JavaScript's Date.now() and Java use milliseconds (13 digits); some tracing tools use microseconds (16 digits). Auto mode picks the unit from the number of digits, so you can paste whatever you have.
To go the other way, type a date. A date without a time zone, such as 2026-03-15 09:30, is read as UTC unless you switch on local time; a full ISO string with Z or an offset like +02:00 is always unambiguous. Conversion uses your device's clock and time zone and runs entirely in the browser.
Frequently asked questions
What is the Year 2038 problem?
Systems that store Unix time as a signed 32-bit integer overflow at 03:14:07 UTC on 19 January 2038 (timestamp 2,147,483,647) and wrap to 1901. Modern systems use 64-bit integers, which last for billions of years.
Does Unix time include leap seconds?
No. Every Unix day is exactly 86,400 seconds. When a leap second occurs, clocks repeat or smear a second, so Unix time is not a precise count of physical seconds.
How do I get the current timestamp in code?
JavaScript: Math.floor(Date.now() / 1000). Python: int(time.time()). Shell: date +%s. SQL (PostgreSQL): extract(epoch from now()).