Timestamp troubleshooting

Unix Timestamp Seconds vs Milliseconds

Unix timestamps measure elapsed time since 1970-01-01T00:00:00Z. A current timestamp in seconds is usually 10 digits, while the same instant in milliseconds is usually 13 digits. Multiply seconds by 1,000 or divide milliseconds by 1,000 to convert between them.

At a glance

Quick answer

  • Unix timestamps represent an instant relative to UTC, not a local wall-clock timezone.
  • Current second timestamps are usually 10 digits; current millisecond timestamps are usually 13 digits.
  • A unit mismatch moves dates thousands of years away or close to January 1970.
  • Convert units before applying timezone formatting or business-date rules.

Seconds and milliseconds describe the same instant

A Unix timestamp in seconds counts whole or fractional seconds since the Unix epoch. A millisecond timestamp counts thousandths of a second from the same epoch. The unit changes the number, not the instant it represents.

Seconds

1722729600

Milliseconds

1722729600000

Use digit length as a clue, not the only rule

Around the present era, second timestamps commonly contain 10 digits and millisecond timestamps contain 13. That heuristic is useful for interactive tools, but older dates, future dates, negative timestamps, and fractional seconds can have different lengths.

When an API schema or database column documents the unit, trust the contract rather than guessing. Names such as created_at_ms or epochSeconds are stronger evidence than digit count.

  • 10 digits near the present: probably seconds.
  • 13 digits near the present: probably milliseconds.
  • A decimal value may represent fractional seconds.
  • A negative value represents an instant before the Unix epoch when the system supports it.

Recognize a unit mismatch

Treating milliseconds as seconds produces a date far in the future because the value becomes one thousand times too large. Treating seconds as milliseconds produces a date near January 1970 because the value becomes one thousand times too small.

If a conversion result is implausible, inspect the raw value and retry with the other unit before assuming the source data is corrupted.

Timezone comes after timestamp conversion

The timestamp identifies a UTC instant. A converter can display that instant in UTC and in the browser's local timezone, but the underlying timestamp does not change. Timezone offsets only change the human-readable representation.

Input strings without an explicit offset are ambiguous. VetaTool interprets timezone-free date strings as UTC so conversion is deterministic across devices. Include Z or a numeric offset when exchanging dates between systems.

Explicit UTC

2026-08-04T00:00:00Z

Explicit offset

2026-08-04T09:00:00+09:00

A practical debugging checklist

When a timestamp looks wrong, confirm the unit, the epoch, the accepted numeric range, and the display timezone in that order. Converting to an ISO 8601 UTC string makes comparisons between systems easier.

  • Check whether the source contract says seconds, milliseconds, microseconds, or nanoseconds.
  • Convert the raw value to UTC before applying local display rules.
  • Preserve fractional precision only when the receiving system supports it.
  • Compare a known timestamp from the same source to confirm the interpretation.