What is a Unix Timestamp?
A Unix timestamp (also called Epoch time or POSIX time) is the number of seconds that have elapsed since January 1, 1970, at 00:00:00 UTC. This date is known as the Unix Epoch. It provides a simple, timezone-independent way to represent a point in time as a single integer.
Unix timestamps are used extensively in programming, databases, APIs, and log files because they are compact, easy to compare, and unambiguous regardless of timezone or locale settings.
Seconds vs Milliseconds
Some systems use seconds since epoch while others use milliseconds. This tool auto-detects the format, but here's how common languages and APIs handle it:
| Language / API | Function | Unit |
|---|---|---|
| JavaScript | Date.now() | Milliseconds |
| Python | time.time() | Seconds (float) |
| Java | System.currentTimeMillis() | Milliseconds |
| PHP | time() | Seconds |
| Ruby | Time.now.to_i | Seconds |
| Go | time.Now().Unix() | Seconds |
| C / C++ | time(NULL) | Seconds |
| Rust | SystemTime::now() | Seconds (Duration) |
| MySQL | UNIX_TIMESTAMP() | Seconds |
| PostgreSQL | EXTRACT(EPOCH FROM NOW()) | Seconds (float) |
Notable Timestamps
| Timestamp | Date | Significance |
|---|---|---|
0 | Jan 1, 1970 00:00:00 UTC | The Unix Epoch (start of time) |
1000000000 | Sep 9, 2001 01:46:40 UTC | One billion seconds |
1234567890 | Feb 13, 2009 23:31:30 UTC | Sequential digits milestone |
2000000000 | May 18, 2033 03:33:20 UTC | Two billion seconds |
2147483647 | Jan 19, 2038 03:14:07 UTC | Y2K38 problem (32-bit integer overflow) |
FAQ
How does the auto-detection work?
If the entered number is greater than 1,000,000,000,000 (one trillion), it is treated as milliseconds. Otherwise, it is treated as seconds. This heuristic works because a seconds-based timestamp won't exceed one trillion until the year 33658.
What is the Y2K38 problem?
Systems that store Unix timestamps as a signed 32-bit integer will overflow on January 19, 2038 at 03:14:07 UTC. After this point, the timestamp wraps to a negative number, causing the date to jump back to December 1901. Most modern systems use 64-bit integers, which won't overflow for billions of years.
Can I enter negative timestamps?
Yes. Negative Unix timestamps represent dates before January 1, 1970. For example, -86400 represents December 31, 1969 (one day before the epoch).
Does this account for leap seconds?
Unix timestamps do not include leap seconds. Each day is treated as exactly 86,400 seconds. This is by design and matches the behavior of time()in POSIX systems. The UTC times shown here use JavaScript's Date object, which also does not account for leap seconds.
Is my data processed on the server?
No. All conversions happen client-side in your browser. Nothing is sent to any server.