Unix Timestamps: Seconds, Milliseconds and Time Zones
Convert timestamps correctly and avoid the common 1,000× unit mistake.
Why this matters
Unix timestamps refer to an instant relative to 1970-01-01 UTC; local time zones affect display, not the underlying instant.
Worked example
Start with this sample input:
1700000000Example result or interpretation (check the linked tool for exact formatting):
1700000000000Both values represent the same instant if the first is interpreted as seconds and the second as milliseconds.
An instant is not a formatted local time
Unix time counts elapsed seconds from the UTC epoch. JavaScript Date expects milliseconds. Time-zone offsets affect the rendered clock time, not the timestamp representing the instant.
Seconds and milliseconds examples
Seconds
1700000000Interpretation: 2023-11-14T22:13:20.000Z
Milliseconds
1700000000000Interpretation: 2023-11-14T22:13:20.000Z
JavaScript
new Date(1700000000 * 1000).toISOString()Interpretation: 2023-11-14T22:13:20.000Z
A timestamp without an explicit unit is ambiguous. Require the producer to specify seconds or milliseconds instead of guessing from its length.
Step-by-step workflow
- Identify the timestamp unit from the API documentation.
- Convert to an ISO 8601 UTC date and compare expected time.
- Check daylight-saving behavior when displaying local times.
Try the related ByteKitly tool →
Common mistakes and limitations
A ten-digit timestamp is often seconds and a thirteen-digit one is often milliseconds, but verify the source rather than relying on digit count alone.
Test examples using your own data format and verify results before using them in production systems. ByteKitly's core converters operate in the browser, but avoid sharing confidential input in screenshots or links.