What is the Unix Epoch?
The Unix timestamp (also known as POSIX time or Epoch time) represents the number of seconds that have elapsed since 00:00:00 UTC on Thursday, 1 January 1970 (excluding leap seconds). It has become the universal foundation for timestamp storage in databases, logging frameworks, and network protocols.
The 10-Digit vs 13-Digit Trap
| Precision | Digit Length | Standard Ecosystem | Example |
|---|---|---|---|
| Seconds | 10 digits | PHP (time()), Python (time.time()), MySQL (UNIX_TIMESTAMP()) |
1716984000 |
| Milliseconds | 13 digits | JavaScript (Date.now()), Java (System.currentTimeMillis()) |
1716984000000 |
If you pass a 10-digit Unix second timestamp into JavaScript's new Date(timestamp), JavaScript interprets it as milliseconds, resulting in dates near January 1970. Always multiply seconds by 1000: new Date(timestampInSeconds * 1000).
Convert Unix Timestamps to Human Dates
Live conversion between seconds, milliseconds, UTC strings, and ISO-8601 timestamps.
Frequently Asked Questions
YYYY-MM-DDTHH:mm:ss.sssZ (e.g., 2024-05-29T12:00:00.000Z). The trailing Z denotes zero UTC offset.