1700000000 is a date. So is 1700000000000, the same date with three more digits. Neither one says which unit it is in, which time zone it means or whether it will still fit in the column in a few years. Timestamps cause an unusual share of bugs for something that is just a number. This article goes through what the digits mean, with real conversions from the Unix timestamp converter.
What the number counts
A Unix timestamp is the time elapsed since the epoch, 1 January 1970 at 00:00:00 UTC, ignoring leap seconds. In seconds, 1700000000 is:
Unix seconds 1700000000
ISO 8601 (UTC) 2023-11-14T22:13:20.000Z
RFC 2822 Tue, 14 Nov 2023 22:13:20 +0000
Tuesday 14 November 2023, 22:13:20 UTC. Any machine in any time zone computes the same instant from this number. That is the strength of a timestamp: no zone, no daylight saving, no calendar. A local date such as “15 November 2023, 05:13 in Hanoi” is only a way of writing the same instant for a person in UTC+7.
Seconds, milliseconds, microseconds: count the digits
Different systems keep different units:
| Unit | Where you meet it | Digits (dates 2001 to 2286) |
|---|---|---|
| Seconds | Unix date +%s, JWT exp, most APIs, MySQL UNIX_TIMESTAMP() |
10 |
| Milliseconds | JavaScript Date.now(), Java System.currentTimeMillis(), Kafka |
13 |
| Microseconds | Chrome trace files, profilers, some database drivers | 16 |
| Nanoseconds | Go time.Now().UnixNano(), Python time.time_ns(), OpenTelemetry, InfluxDB |
19 |
Put 1700000000000 into the converter and it answers with the same instant and a note: detected Unix milliseconds. The same goes for 1700000000000000 (microseconds). So a quick check is: ten digits, seconds; thirteen, milliseconds. The most common bug is passing one to code that expects the other. A millisecond value read as seconds lands tens of thousands of years in the future; a second value read as milliseconds lands in January 1970.
A heuristic like the converter’s cannot be perfect, because the units overlap. The number 253402300799 is the last second of the year 9999, if it is seconds; read as milliseconds it is January 1978:
Unix milliseconds 253402300799
ISO 8601 (UTC) 1978-01-11T21:31:40.799Z
The converter picks milliseconds for it, since a 12-digit value is far more likely to be a modern millisecond time than a date in the year 9999. When it matters, read the API documentation instead of guessing.
2038: when a 32-bit counter ends
A signed 32-bit integer can hold up to 2,147,483,647. As seconds, that is:
Unix seconds 2147483647
ISO 8601 (UTC) 2038-01-19T03:14:07.000Z
One second later, 2,147,483,648 does not fit. A signed 32-bit counter wraps to −2,147,483,648, which is 13 December 1901. Systems that keep time in 32 bits are affected: old embedded devices, some file formats, a TIMESTAMP column in older MySQL versions, C programs that store time_t in an int. The fix is 64 bits, which moves the limit about 292 billion years away. Look for the problem now, not in 2037: software that computes dates in the future (a 30-year mortgage, a certificate that expires in 2040) can hit it today.
Before 1970: negative values
The converter reads -1 as 31 December 1969, 23:59:59 UTC. Negative timestamps are valid, and they are how birth dates before 1970 are stored in a plain integer. Check that your database column is signed and your language does not treat a negative value as “missing”.
Time zones: store the instant, show the local time
Mistakes come from converting too early. A reliable pattern:
- Store the instant: a timestamp, or an ISO 8601 string ending with
Zor an offset. - Transmit it the same way.
- Convert to a local date only for display, using the viewer’s zone.
Do not store “2026-10-26 09:00” without a zone: it names no instant. The converter has a Time zone box that shows the same instant for any zone, which is useful when two people in different countries talk about “9 o’clock”. For scheduled jobs the same rule applies; see cron and time zones for what happens when a local clock changes.
Leap seconds
Unix time pretends that every day has exactly 86,400 seconds. When a leap second is added, the system clock repeats or smears a second, so the timestamp is not an exact count of elapsed physical seconds. For dates, durations of hours and billing, it never matters. For measuring microseconds between events on different machines, use a monotonic clock, not subtraction of wall-clock timestamps.
A short checklist
- Count the digits before you trust the unit; read the docs of the API.
- Use 64-bit integers for timestamps in new schemas.
- Store UTC, convert at the edge.
- Remember that JavaScript’s
Datetakes milliseconds, andnew Date(1700000000)is not what you think. - When a JWT looks expired too early or too late, check whether
expis in seconds, as the standard says; the JWT decoder shows it as a date. The article JWT decoding is not verifying explains the other claims.
Everything you convert in the tool is processed in your browser and never uploaded.
Frequently asked questions
How can I tell whether a timestamp is in seconds or milliseconds?
By its length. For dates from 2001 to 2286, seconds have 10 digits, milliseconds 13, microseconds 16 and nanoseconds 19. A value such as 1700000000 is seconds (14 Nov 2023) and 1700000000000 is the same instant in milliseconds. Read the documentation of the API, because a heuristic can be fooled by dates far in the past or future.
What is the year 2038 problem?
A signed 32-bit integer holds at most 2,147,483,647. As seconds since 1970 that is 19 January 2038, 03:14:07 UTC. One second later the value does not fit and wraps to a negative number, which is a date in 1901. Systems that store timestamps in 64 bits are safe; old embedded devices, file formats and database columns are not.
Does a Unix timestamp have a time zone?
No. It counts seconds since 1970-01-01 00:00:00 UTC, so the same number means the same instant everywhere. A time zone only appears when you show it as a local date. Store the number or an ISO 8601 string with Z, and convert for display.
What does a negative timestamp mean?
A moment before 1 January 1970. -1 is 31 December 1969, 23:59:59 UTC. Many systems accept negative values, but some treat them as an error or as 'not set', so test the code path if you need dates of birth before 1970.
Do Unix timestamps count leap seconds?
No. Every day counts exactly 86,400 seconds, and the clock is stepped or slowed around a leap second. That keeps arithmetic simple (a day later is plus 86,400) but means a timestamp is not an exact count of elapsed seconds. For most applications this never matters.
More guides
- CIDR notation: why a /31 has two usable hosts, what a /32 is for, and the subnet mistakes to avoid
- Hashing is not encryption: what a hash can do, and why passwords need bcrypt
- UUID v4, UUID v7 and ULID: which ID to use, and what is inside each
- Base64 is not encryption: what it does, and the bugs it causes
- JSON, CBOR, MessagePack and Protobuf: the same data in four sets of bytes
- Regex backtracking: how one innocent pattern can freeze a server (ReDoS)
- URL encoding pitfalls: %20 or +, double encoding, and the characters that break links
- Cron and time zones: why your 02:30 job runs twice or never
- CSV edge cases: quotes, newlines, delimiters and the leading zero
- Why JSON silently changes your big numbers (and how to stop it)
- JWT pitfalls: decoding a token is not verifying it
- YAML surprises: the Norway problem, octal numbers and version strings