- Seconds or milliseconds, detected by magnitude
- Unix time is defined in seconds, but JavaScript, Java and many APIs use milliseconds, and mixing them is the most common timestamp bug. A millisecond value read as seconds lands tens of thousands of years in the future; a seconds value read as milliseconds lands near January 1970. A 10-digit value is seconds and a 13-digit value is milliseconds, so magnitude is a reliable signal. You can override the detection if your value is genuinely ambiguous.
- UTC versus local time
- The timestamp itself carries no timezone; it is always an instant in UTC. Both the UTC rendering and your browser's local rendering are shown, because the difference is where timezone bugs live. If you need a specific zone other than your own, convert to UTC and offset from there.
- ISO 8601 is the right interchange format
- The ISO form (2023-11-14T22:13:20.000Z) sorts correctly as text, is unambiguous about its offset, and is parsed by every modern language. The trailing Z means UTC. Prefer it over locale-dependent formats for anything crossing a system boundary.
- Range and precision limits
- JavaScript dates span roughly ±8.64 × 10^15 milliseconds around 1970, about ±273,000 years, and values beyond that are rejected. Note also the 2038 problem: systems storing Unix time in a signed 32-bit integer overflow on 19 January 2038, which is why 64-bit storage matters for future dates.
- Leap seconds are not represented
- Unix time deliberately ignores leap seconds, treating every day as exactly 86,400 seconds. It is therefore not a true count of elapsed SI seconds, and sub-second accuracy across a leap second is not something this or any Unix timestamp can express.