Guide

How to Convert Server Log Timestamps Without Losing Event Order

A practical guide to seconds, milliseconds, UTC, local time, and incident timeline notes.

Last updated: 2026-07-23

Identify the timestamp format

A log may contain Unix seconds, Unix milliseconds, ISO 8601 strings, database datetime values, or application-specific text. Do not convert a timestamp until you know which format it uses.

Check seconds versus milliseconds

Unix seconds are usually 10 digits around current dates, while Unix milliseconds are often 13 digits. Mixing the two is one of the most common causes of impossible dates in logs and dashboards.

Normalize to UTC first

When comparing events from a web server, queue, database, browser, payment provider, and analytics system, convert everything to UTC first. UTC keeps the timeline stable across regions and daylight saving changes.

Use local time for explanation

After the technical order is clear, add local time only for the person reading the report. For example, support notes can include both UTC and the customer's local time so the event is easier to recognize.

Keep the original value

Never replace the original log timestamp in your notes. Put the converted value beside it. This makes it possible to audit the conversion later if another teammate uses a different tool or timezone setting.

Review daylight saving boundaries

Scheduled jobs, billing events, and local notifications can behave differently around daylight saving transitions. When a problem occurs near a clock change, verify the full timezone name and date rather than relying on a short abbreviation.

Back to guides