Unix timestamps: seconds vs milliseconds

Ten digits commonly means seconds and thirteen commonly means milliseconds. Treating one as the other shifts the date by roughly a factor of 1,000.

What to know before you start

A timestamp is an instant, not a city time zone. Historical/future local display depends on IANA time-zone rules and daylight-saving changes.

Recommended workflow

  1. Check the source documentation for the expected unit before relying on digit length.
  2. Convert the value as both seconds and milliseconds if the source is ambiguous; one result will usually be obviously wrong.
  3. Verify the instant in UTC first, then apply the intended IANA time zone for local display.

How to check the result

Recheck the result against the original input and the rule you intended to apply. A timestamp is an instant, not a city time zone. Historical/future local display depends on IANA time-zone rules and daylight-saving changes.

Worked example and limits

Convert 946684800 as seconds and 946684800000 as milliseconds: both represent 2000-01-01T00:00:00.000Z. Automatic detection uses an absolute-value threshold of 100000000000. Milliseconds near the epoch and far-future seconds can be ambiguous, so choose the unit explicitly. Z means UTC; a different local clock display represents the same instant.

Frequently asked questions

Why are some Unix timestamps 10 digits and others 13?

Modern timestamps in seconds are commonly around 10 digits, while milliseconds are commonly around 13. Always confirm the unit rather than relying only on length.

Does a Unix timestamp contain a time zone?

No. It identifies an instant relative to UTC; a time zone is applied only when displaying that instant as local time.

Unix Timestamp Converter

Auto-detect Unix seconds or milliseconds and convert among local time, UTC, ISO 8601 and multiple IANA zones with relative time.

Open the related tool