Utilido

Utilido blog

Unix timestamps: telling seconds from milliseconds in logs

Why epoch values land in 1970 or the far future, and how to sanity-check timestamps from APIs and logs.

By Benchehida Abdelatif · Published May 15, 2026 · Updated May 24, 2026 · 6 min read

A timestamp that looks wrong is often a unit mistake, not a bad clock. APIs, databases, and mobile clients mix Unix seconds, Unix milliseconds, and ISO 8601 strings. Counting digits is the fastest first check.

Digit count cheat sheet

  • 10 digits (around 1.7B today): usually seconds since 1970-01-01 UTC.
  • 13 digits: usually milliseconds (three extra zeros).
  • ISO strings with Z or +00:00: timezone-aware text, good for copying between systems.

What goes wrong in practice

Feeding milliseconds into a tool that expects seconds pushes dates decades into the future. The reverse lands near 1970. JWT exp fields and log lines are common places this appears. Always compare UTC and local labels when debugging a server in another region.

Using the Utilido timestamp converter

Paste the value from your log or JSON payload into the Unix Timestamp Converter. Check both interpretations if the year looks impossible. Copy the ISO line when you need a value that sorts cleanly in spreadsheets or config files.

Related tasks

Duration math and calendar dates answer different questions. Use a date calculator for deadlines, and a timezone converter when the location matters more than the epoch integer.