Unix timestamp converted to ISO
- Input
- 1712345678
- Expected output
- 2024-04-05T19:34:38.000Z
Always 3 decimal places and a Z suffix, even when the input timestamp is given in whole seconds with no milliseconds.
ISO 8601 date format
ISO 8601 is not a single format, it is a family of valid representations, and much of the confusion in APIs comes from different systems using different slices of that family. This page focuses on the structure Unix timestamps and ISO 8601 share, and on the narrower profile most internet protocols actually accept.
Always 3 decimal places and a Z suffix, even when the input timestamp is given in whole seconds with no milliseconds.
-03:00 and Z describe the same instant, only the text representation changes; the resulting Unix timestamp is identical.
Week dates exist in the full standard, but sit outside the profile that JSON APIs and most date parsers accept.
It is the number of seconds (or milliseconds in JavaScript) elapsed since 1 January 1970 at 00:00:00 UTC. Also called Epoch time or POSIX time, it is the universal format for representing time instants in computing systems.
No, they are semantically the same instant: both mark zero offset, that is, UTC. Z is the compact notation (Zulu, from the military phonetic alphabet), +00:00 is the explicit offset form. RFC 3339 accepts both, but JavaScript's toISOString(), which this converter uses, always emits Z, never +00:00.
Because RFC 3339, the ISO 8601 profile that RFC 8259 (the JSON standard) references, deliberately excludes week dates, ordinal dates and truncated formats. A strict JSON parser only recognises the full calendar format with T and a timezone indicator, so sending 2024-W15-5 breaks most date libraries.
No. -03:00 and Z describe the same instant in different text; the Unix timestamp (seconds or milliseconds since 1970-01-01T00:00:00Z) is always relative to UTC and carries no timezone at all. The offset only matters when formatting the date for human reading.