Seconds, milliseconds, microseconds or nanoseconds?
Different systems count Unix time in different units. The converter reads the unit from the number of digits; pick one by hand if it guesses wrong.
| Unit | Digits today | Example | Used by |
|---|---|---|---|
| Seconds | 10 | 1700000000 | Unix date +%s, PHP time(), Python time.time(), JWT exp |
| Milliseconds | 13 | 1700000000000 | JavaScript Date.now(), Java System.currentTimeMillis() |
| Microseconds | 16 | 1700000000000000 | PostgreSQL internals, Python time.time_ns() // 1000 |
| Nanoseconds | 19 | 1700000000000000000 | Go time.Now().UnixNano(), InfluxDB, Prometheus |
Dates you can type
2026-11-18or2026/11/18: midnight in the selected time zone.2026-11-18 20:45or2026-11-18T20:45:00.250: that time in the selected time zone.2026-11-18T13:45:00Zor2026-11-18 20:45+07:00: the time zone you typed wins.18 Nov 2026 20:45and HTTP dates such asWed, 18 Nov 2026 13:45:00 GMT.
Getting the current timestamp in code
| Language | Seconds |
|---|---|
| JavaScript | Math.floor(Date.now() / 1000) |
| Python | int(time.time()) |
| PHP | time() |
| Go | time.Now().Unix() |
| Java | Instant.now().getEpochSecond() |
| MySQL | UNIX_TIMESTAMP() |
| PostgreSQL | EXTRACT(EPOCH FROM now()) |
| Shell | date +%s |
Example
1700000000 is Tuesday 14 November 2023, 22:13:20 UTC, which is Wednesday 15 November 2023, 05:13:20 in Jakarta (UTC+07:00). The same instant as milliseconds is 1700000000000.
Questions
What is a Unix timestamp?
The number of seconds since 1 January 1970, 00:00:00 UTC, not counting leap seconds. It is the same everywhere in the world at a given moment, which is why programs store times this way. 0 is the start of 1970; negative numbers are earlier dates.
How do I know if a timestamp is in seconds or milliseconds?
Count the digits. For dates between 1973 and 5138, seconds have 10 or 11 digits, milliseconds 13 or 14 (JavaScript's Date.now()), microseconds 16 or 17, and nanoseconds 19 (Go and many databases). The converter detects this, and you can override it.
Which time zone does a date I type use?
The one selected under the input, which starts as your own. Add an offset to the date (2026-11-18 20:45+07:00) or a Z for UTC to ignore the selection.
What happens in the year 2038?
Programs that store Unix time in a signed 32-bit integer run out on 19 January 2038 at 03:14:07 UTC (2147483647). This converter uses 64-bit numbers and works far beyond that.
Are timestamps affected by daylight saving time?
No. A timestamp is always UTC. Only the date shown for a time zone changes. When you type a local time that falls in a daylight-saving gap, such as 02:30 on the spring change, it is moved forward to the first valid time.
Is my data sent anywhere?
No. The conversion runs in your browser.
Support this site
The tools are free and need no account. If one saved you time, a small donation helps keep them running.
Want a tool or feature? Suggest it for free, or donate and write your request in the message. Supporters' requests are looked at first.