Unix timestamp converter
Turn log timestamps into human time, then convert dates back into seconds or milliseconds without mental math.
Timestamp basics
What is a Unix timestamp?
A Unix timestamp measures time from January 1, 1970 at 00:00:00 UTC. The number is timezone-neutral, but the moment you display it to a person, logs, dashboards, databases, and browsers may render it in different local zones.
Common units
| Unit | Typical length | Example |
|---|---|---|
| Seconds | 10 digits | 1716300000 |
| Milliseconds | 13 digits | 1716300000000 |
Time concepts
What is the Y2038 problem?
Systems using signed 32-bit integers for Unix timestamps overflow in January 2038. Modern 64-bit systems avoid that limit.
UTC vs local time
Store and compare timestamps in UTC when possible. Convert to local time only at the edge of the product, such as UI display, reports, or exports.
ISO 8601
A readable timestamp format such as 2024-05-21T14:30:00Z. It is widely used in APIs, databases, logs, and distributed systems because it can include timezone information.
Seconds vs milliseconds
Ten-digit values are usually seconds. Thirteen-digit values are usually milliseconds. Mixing the two is one of the most common timestamp bugs.
Common conversion reference
| Duration | Seconds | Milliseconds |
|---|---|---|
| 1 minute | 60 | 60,000 |
| 1 hour | 3,600 | 3,600,000 |
| 1 day | 86,400 | 86,400,000 |
| 1 year (365 days) | 31,536,000 | 31,536,000,000 |