Unix timestamp guide | UnixDate
Developer guide for working with Unix timestamps safely and predictably.
UTC vs local time
Unix time is always defined in UTC. Most bugs happen when you format or parse dates in a local timezone without realizing it.
Rules that prevent outages
- Store timestamps in UTC (epoch seconds or ISO 8601 Z).
- Convert to local time only at the UI boundary.
- Avoid ambiguous local times during DST transitions.
Logs and debugging
If your logs are in local time, debugging distributed systems becomes painful. Prefer UTC logs and include the offset when you must use local time.