How it is calculated
Unix time counts the seconds since 1 January 1970, 00:00:00 UTC – the so-called epoch. Leap seconds are not counted; every day has exactly 86,400 seconds.
Timestamp = (date − 1 Jan 1970 UTC) in seconds
JavaScript, Java and many databases work in milliseconds – there the value is 1,000 times larger and usually 13 digits long. Times before 1970 have negative timestamps.
Example
The timestamp 1767225600 stands for Thursday, January 1, 2026 at 12:00:00 AM UTC, written in ISO 8601 as 2026-01-01T00:00:00.000Z – New Year 2026 in UTC.
Frequently asked questions
What is the year 2038 problem?
Many older systems store the timestamp as a signed 32-bit number. Its largest value, 2,147,483,647, is 19 January 2038, 03:14:07 UTC – one second later the number wraps around to negative. Modern systems use 64 bits.
Is the timestamp the same everywhere in the world?
Yes. A timestamp has no time zone; it is only converted to local time when displayed.
How do I recognise milliseconds?
Current timestamps in seconds have 10 digits, in milliseconds 13 digits.
How do I get the current timestamp?
On the command line with “date +%s”, in JavaScript with Math.floor(Date.now() / 1000), in Python with int(time.time()).