A timestamp is just seconds counted from one fixed instant
Unix time (also called epoch or POSIX time) is a plain count of seconds since midnight UTC on 1 January 1970. That reference moment is value zero. Because it is one number in UTC, it names the same instant anywhere on Earth with no time zone to reconcile.
Seconds vs milliseconds — the digit count gives it away
The same instant can be written in seconds or milliseconds, and mixing them up throws the result off by a factor of 1000. Count the digits before you trust a value: a current timestamp has 10 digits in seconds and 13 in milliseconds.
| Unit of the count | Digits (present day) | Where you see it |
|---|---|---|
| Seconds | 10 | Linux, databases, Python time.time() |
| Milliseconds | 13 | JavaScript Date.now(), many web APIs |
| Microseconds | 16 | High-resolution logging, some tracing |
Fixed conversions worth knowing
| Interval | Seconds |
|---|---|
| 1 minute | 60 |
| 1 hour | 3,600 |
| 1 day | 86,400 |
| 1 week | 604,800 |
| 1 common year (365 days) | 31,536,000 |
Every day is treated as exactly 86,400 seconds. POSIX ignores leap seconds, so occasional UTC leap seconds have no separate representation in the count.
The 2038 limit on 32-bit systems
A signed 32-bit integer maxes out at 2,147,483,647 seconds. Once a system that stores time this way passes that point, the value overflows and wraps to a large negative number, throwing the clock back to 1901. The fix is a 64-bit integer, which pushes the range far beyond any practical concern.
- 32-bit signed — runs out at 2,147,483,647 seconds, in early 2038.
- 64-bit signed — covers roughly 292 billion years each way; effectively unbounded.
Common questions
What is a Unix timestamp?
It is the number of seconds that have passed since the Unix epoch, midnight UTC on 1 January 1970. Because it is a single count of seconds in UTC, it means the same instant everywhere, with no time zone attached.
Is my timestamp in seconds or milliseconds?
Count the digits. A present-day value in seconds is 10 digits; in milliseconds it is 13. JavaScript works in milliseconds, while most operating systems and databases use seconds. To convert, multiply seconds by 1000 or divide milliseconds by 1000.
Can a timestamp be negative?
Yes. Negative values count seconds before the epoch, so they represent moments before 1970. Minus 86400 is exactly one day before the epoch.


