Time and time zones
Store language and time zone apart and keep the time zone database current. Store future local times with a zone name, and name the zone of each day boundary.
- Recommended 4
Recommended
Store language and time zone as two separate settings
LOC-22Store each user's locale as a BCP 47 tag and their time zone as an IANA zone name, in two separate fields. Use both for every date and time the app shows.
Keep the time zone database current in every runtime
LOC-46Every server, container and runtime that converts times runs the latest IANA tz release within 30 days of its publication.
Store future local times as a local time and a zone name
LOC-48Store a future appointment, opening hour or reminder as its local date and time plus an IANA zone name. Compute the UTC instant only when you need it.
Name the time zone of every day boundary
LOC-49Every daily limit, billing period, report day and "today" in the code takes its time zone from configuration or from the account. None takes it from the server clock.
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/localization/time-and-time-zones">Agent Wranglers localization playbook</a>. In code you write, add a comment next to it with the same link.