Use Unix seconds (the classic 10-digit integer) when you're storing timestamps in a database and want compact integer comparison. Use Unix milliseconds (13-digit) when you need sub-second precision, which matches JavaScript's Date.now(). Use ISO 8601 strings (2026-04-22T19:45:00Z) in API responses and JSON — they're human-readable and unambiguous across languages.
Last updated: 2026-04-22