Skip to content

Lesson 4 of 9 · 23m

IANA Zones Are Rules; Offsets Are Temporary Facts

Use the tz database correctly: named zones carry historical and future rules, while fixed offsets destroy scheduling intent.

The worst timezone data model I still see in mature systems is a dropdown of offsets: UTC-8, UTC-5, UTC+1. It feels concrete and international. It is also wrong for scheduling, because UTC-5 is not a place. America/New_York is a set of rules: sometimes UTC-5, sometimes UTC-4, with transition dates chosen by law and occasionally changed after your code shipped.

Names encode behavior

The IANA timezone database — usually called tzdata or the tz database — defines zones such as:

America/New_York
America/Los_Angeles
Europe/London
Asia/Tokyo
Australia/Sydney
America/Santiago

A zone identifier is stable even as its rules change. An offset is only the answer at a particular instant. Store both pieces when they serve different purposes: the resolved instant in UTC, and the zone name that expressed the user's scheduling intent.

tzdata is operational data

Your application may use the host's tz database, a language-packaged copy, or both. Check versions when behavior differs across environments:

zdump -v America/New_York | grep 2026
python3 - <<'PY'
import zoneinfo, tzdata
print(tzdata.__version__)
print(zoneinfo.ZoneInfo('America/New_York'))
PY

Node commonly ships ICU data with timezone rules. Browsers update them through operating-system or browser releases. Python's zoneinfo can use system data or the PyPI tzdata package. If a government changes DST rules and only one runtime gets the update, services disagree while both appear healthy.

Abbreviations are not identifiers

CST can mean China Standard Time, Cuba Standard Time, or Central Standard Time. IST can mean India, Ireland, or Israel. Even when unambiguous locally, abbreviations do not encode transition rules. Never persist EST, PST, or CET as the user's zone. Persist the IANA identifier.

Fixed offsets have legitimate narrow uses

Offsets are fine in wire representations because they disambiguate an instant: 2026-03-08T07:30:00Z or 2026-03-08T02:30:00-05:00. They are also fine for a fixed-offset system such as UTC logging. They are not adequate for future calendar appointments, payroll schedules, renewal times, or business-hour logic.

Resolution requires a direction

Converting local intent to UTC is a policy decision when the local time is invalid or repeated. Converting UTC to local is usually deterministic display. That asymmetry matters. You cannot build correct scheduling by treating timezone conversion as a pure mathematical inverse.

Field notes

  • Etc/UTC is a fixed zone; user-facing scheduling generally needs a geographic IANA zone.
  • Zone aliases exist for compatibility, but canonical identifiers make analytics and debugging cleaner.
  • Do not maintain your own JSON map of offsets; it will be wrong before the next legislative change.
  • Test with zones that actually transition, such as America/New_York, Europe/London, Australia/Lord_Howe, and America/Santiago.

Was this lesson helpful?

Sign in to rate