Timestamp converter and diff

Convert and diff two timestamps. Unix s/ms/µs/ns, ISO 8601, relative time, timezone — exact to the nanosecond.

About this tool

Converts two timestamps and gives you the exact gap between them, down to the nanosecond. It reads Unix seconds, milliseconds, microseconds, and nanoseconds (guessing the unit from the magnitude, or you can choose it) as well as ISO 8601. The arithmetic uses integers throughout, so nothing gets rounded away.

Good for

  • Measuring latency between two log lines or trace spans that use different units
  • Comparing event times across services, one logging in ms and the other in ns
  • Checking clock skew between hosts

Not for

  • Proving that one event caused another: clocks on different machines drift, so use trace IDs for causality
  • Leap-second-exact intervals across a leap second

Further reading on mikepreston.org