What a Unix timestamp is
A Unix timestamp counts the seconds since 1 January 1970, 00:00 UTC. It is the same everywhere in the world, which is why databases, APIs and logs use it.
- 10 digits (like
1767225600) are seconds. - 13 digits (like
1767225600000) are milliseconds, as JavaScript'sDate.now()returns.
The converter tells them apart by length, so you can paste either.
In code
| Language | Current timestamp |
|---|---|
| JavaScript | Math.floor(Date.now() / 1000) |
| Python | int(time.time()) |
| PHP | time() |
| MySQL | UNIX_TIMESTAMP() |
| Bash | date +%s |
Timestamps carry no time zone: the conversion to local time happens when you display them.
Frequently asked questions
Is a Unix timestamp in UTC?
Yes. It counts seconds from midnight UTC on 1 January 1970, and is the same number in every time zone.
What is the 2038 problem?
Systems that store timestamps as signed 32-bit integers overflow on 19 January 2038 at 03:14:07 UTC. Modern systems use 64-bit values, which last for billions of years.
How do I tell seconds from milliseconds?
Current timestamps in seconds have 10 digits; in milliseconds they have 13.
Sources
The rules and figures in this tool come from these official sources, last checked November 12, 2026.
- RFC 3339: date and time on the internet rfc-editor.org