Convert epoch and Unix timestamps to human-readable dates and back. Runs in your browser.
Supports seconds, milliseconds, microseconds and nanoseconds (auto-detected).
The Unix epoch (also called Unix time, POSIX time or a Unix timestamp) is the number of seconds that have elapsed since January 1, 1970 at 00:00:00 UTC, not counting leap seconds. In ISO 8601 that moment is 1970-01-01T00:00:00Z. Strictly, the epoch is Unix time 0, but the word is often used for any Unix timestamp.
Systems that store the value as a signed 32-bit integer overflow on January 19, 2038 — the "Year 2038 problem". Modern 64-bit systems are not affected.
| Unit | Digits (today) | Example |
|---|---|---|
| Seconds | 10 | 1800000000 |
| Milliseconds | 13 | 1800000000000 |
| Microseconds | 16 | 1800000000000000 |
| Nanoseconds | 19 | 1800000000000000000 |
| Period | Seconds |
|---|---|
| 1 hour | 3,600 |
| 1 day | 86,400 |
| 1 week | 604,800 |
| 1 month (30.44 days) | 2,629,743 |
| 1 year (365.25 days) | 31,557,600 |
| Language | Current time | Epoch to date |
|---|---|---|
| JavaScript | Math.floor(Date.now()/1000) | new Date(1800000000*1000) |
| Python | import time; time.time() | time.ctime(1800000000) |
| PHP | time() | date('r', 1800000000) |
| Java | System.currentTimeMillis()/1000 | new java.util.Date(1800000000L*1000) |
| C# | DateTimeOffset.Now.ToUnixTimeSeconds() | DateTimeOffset.FromUnixTimeSeconds(1800000000) |
| Ruby | Time.now.to_i | Time.at(1800000000) |
| Go | time.Now().Unix() | time.Unix(1800000000, 0) |
| Dart | DateTime.now().millisecondsSinceEpoch ~/ 1000 | DateTime.fromMillisecondsSinceEpoch(1800000000*1000) |
| MySQL | SELECT UNIX_TIMESTAMP(NOW()); | SELECT FROM_UNIXTIME(1800000000); |
| PostgreSQL | SELECT EXTRACT(EPOCH FROM now()); | SELECT TO_TIMESTAMP(1800000000); |
| SQLite | SELECT unixepoch(); | SELECT datetime(1800000000, 'unixepoch'); |
| Linux | date +%s | date -d @1800000000 |
| macOS | date +%s | date -r 1800000000 |
| PowerShell | [DateTimeOffset]::Now.ToUnixTimeSeconds() | [DateTimeOffset]::FromUnixTimeSeconds(1800000000) |
| Excel | — | =(A1/86400)+25569 |