Notes
Seconds or milliseconds?
Unix tools, most databases and HTTP headers count seconds; JavaScript, Java and many JSON APIs count milliseconds. Ten digits is almost always seconds, thirteen is milliseconds, sixteen and nineteen are micro- and nanoseconds.
ISO 8601 vs RFC 3339
RFC 3339 is a strict profile of ISO 8601 for the Internet: it needs a full date, a time and an offset (Z or +03:00). ISO 8601 also allows week dates like 2026-W41-5 and ordinal dates like 2026-282.
Store UTC, show local
Keep instants in UTC and convert only for display. An offset is not a time zone: +03:00 is a fact about one moment, while Europe/Istanbul is a set of rules that can change.
Some local times never happen
When clocks jump forward for daylight saving, an hour of wall time is skipped; when they fall back, an hour happens twice. The converter moves a skipped time forward and picks the earlier of two repeats.
Leap seconds don’t count
Unix time pretends every day has exactly 86 400 seconds, so the 27 leap seconds added since 1972 are invisible to it. That is why 23:59:60 has no timestamp of its own.
The 2038 problem
A signed 32-bit seconds counter overflows at 2147483647 — 2038-01-19 03:14:07 UTC — and wraps to 1901. Anything still storing time in int32 needs 64 bits before then.