Quick reference

TopicValueUse
Seconds10 digitsUnix logs, cron, many APIs
Milliseconds13 digitsJavaScript Date.now(), browser events
Microseconds16 digitsdatabases and tracing
Nanoseconds19 digitshigh precision telemetry

Practical notes

A 10-digit value is usually Unix seconds, while a 13-digit value is usually Unix milliseconds. This is the fastest first check when an API returns a date that appears decades off.

JavaScript Date, browser performance logs, and many frontend events use milliseconds. Many databases, queues, and infrastructure logs may use seconds, microseconds, or nanoseconds, so field names should include the unit.

CheckWhy it matters
Unit labelField names such as created_at_ms or expires_at_s prevent seconds/milliseconds mixups.
TimezoneStore UTC or an explicit offset. Avoid server-local assumptions in jobs, logs, and API tests.
Round tripConvert timestamp to ISO and back before shipping a parser or migration script.

Open the Unix Timestamp Converter