Guides · Formatting

Unix Timestamp Guide: Seconds, Milliseconds, and Time Zones

Avoid common date bugs when moving between logs, APIs, and user-facing timestamps.

Last updated: May 4, 2026

Seconds vs milliseconds

10-digit values are usually Unix seconds, 13-digit values are milliseconds. Mixing them is a top source of date bugs.

Store UTC, render local

Keep canonical timestamps in UTC and convert to local time only for user display. This prevents daylight-saving and server-region drift issues.

API contract tip

Document timestamp unit explicitly in API schemas. Never rely on consumers to guess seconds vs milliseconds.