How to use the epoch converter
- Timestamp to date: paste a Unix timestamp. The date and time appear in UTC and in your own time zone, with the ISO 8601 and RFC 2822 forms, how long ago or how far ahead it is, and the same moment in seconds, milliseconds, microseconds and nanoseconds.
- Date to timestamp: choose Date → timestamp and type a date such as
2027-01-01 09:30. Pick whether it is UTC or your time zone, or end it with an offset such as+05:30orZ. - The current Unix timestamp ticks at the top of the result. Copy it in seconds or milliseconds, or press Convert this moment.
What Unix time is
Unix time — also called epoch time or a POSIX timestamp — counts the seconds since 00:00:00 UTC on January 1, 1970, the Unix epoch. A moment before 1970 has a negative timestamp. Every day counts as exactly 86,400 seconds: leap seconds are left out, so Unix time is not a perfect count of elapsed seconds, but any timestamp converts to a calendar date with simple arithmetic.
A timestamp has no time zone. 1800000000 is the same instant in Tokyo and in Chicago; only the clock time people read there differs. That is why databases, logs and APIs store timestamps and convert to local time only for display.
Seconds, milliseconds, microseconds or nanoseconds?
Different systems count in different units, and the number of digits gives it away. For today’s dates:
| Digits | Unit | Typical sources |
|---|---|---|
| 10 | Seconds | Unix and Linux (date +%s), PHP time(), Python int(time.time()), most APIs and databases |
| 13 | Milliseconds | JavaScript Date.now(), Java System.currentTimeMillis() |
| 16 | Microseconds | Some databases and logging systems |
| 19 | Nanoseconds | Go time.Now().UnixNano(), Python time.time_ns() |
The converter reads up to 11 digits as seconds (that reaches the year 5138), 12 to 14 as milliseconds, 15 to 17 as microseconds and 18 to 20 as nanoseconds. A millisecond timestamp from before March 1973 has fewer than 12 digits and would be taken for seconds — choose the unit yourself in that case. Long timestamps are converted exactly, digit for digit, with no rounding.
Worked example
The timestamp in the box, 1800000000, is Friday, January 15, 2027 at 8:00:00 AM UTC. In New York that is 3:00 AM the same day (UTC−5 in winter); in India it is 1:30 PM (UTC+5:30). In ISO 8601 it is written 2027-01-15T08:00:00Z, and in an email header (RFC 2822) Fri, 15 Jan 2027 08:00:00 +0000. In milliseconds it is 1800000000000.
| Timestamp | Date and time (UTC) | |
|---|---|---|
| 0 | 1970-01-01 00:00:00 UTC | The Unix epoch |
| 1,000,000,000 | 2001-09-09 01:46:40 UTC | One billion seconds |
| 1,234,567,890 | 2009-02-13 23:31:30 UTC | The digits 1 to 0 in order |
| 1,700,000,000 | 2023-11-14 22:13:20 UTC | |
| 1,800,000,000 | 2027-01-15 08:00:00 UTC | The sample in the box |
| 2,000,000,000 | 2033-05-18 03:33:20 UTC | Two billion seconds |
| 2,147,483,647 | 2038-01-19 03:14:07 UTC | The 32-bit limit: the year 2038 problem |
The year 2038 problem
Older software stored Unix time in a signed 32-bit integer, whose largest value is 2,147,483,647 — 03:14:07 UTC on January 19, 2038. One second later such a counter wraps around to −2,147,483,648, which reads as December 13, 1901. Modern systems use 64-bit time and are fine for billions of years, but embedded devices, old file formats and database columns declared as 32-bit integers can still fail. The converter points out when a timestamp is past that limit.
Getting the current timestamp in code
- JavaScript:
Math.floor(Date.now() / 1000) - Python:
int(time.time()) - PHP:
time() - Java:
Instant.now().getEpochSecond() - Go:
time.Now().Unix() - MySQL:
UNIX_TIMESTAMP()· PostgreSQL:EXTRACT(EPOCH FROM now()) - Linux and macOS shell:
date +%s
To compare two dates or see how much time lies between them, try the date difference calculator; for clock times in other cities, the time zone converter.
Frequently asked questions
What is epoch time?
Epoch time is another name for Unix time: the number of seconds since the Unix epoch, 00:00:00 UTC on January 1, 1970. “Epoch” on its own means a reference moment from which time is counted.
Is a Unix timestamp in UTC or local time?
Neither, strictly: it counts seconds from a moment defined in UTC, so it is the same number everywhere in the world. Converting it to a date needs a time zone, which is why the converter shows both UTC and yours.
Why is my converted time off by several hours?
Usually a local time was treated as UTC, or the other way round, somewhere along the way. Check which time zone the date was written in, and use the time zone option or an offset such as +02:00 when converting a date.
Why does my timestamp have 13 digits?
It is in milliseconds, as JavaScript and Java produce. Divide by 1,000 for seconds. The converter detects the unit from the number of digits.
Does Unix time count leap seconds?
No. Unix time treats every day as 86,400 seconds. When a leap second is inserted, a Unix clock repeats or smears a second instead, so differences between timestamps across a leap second are off by one second.
Last updated: October 15, 2026