← All notes

zoneinfo.ZoneInfo is the standard-library IANA time zone implementation

Answer: zoneinfo provides a concrete time zone implementation to support the IANA time zone database. ZoneInfo is a concrete implementation of datetime.tzinfo. Attach it through the datetime constructor, replace, or astimezone. By default the module uses the system's time zone data if available.

Data source and keys

If no system time zone data is available, the library falls back to the first-party tzdata package on PyPI. Construct a zone with a key such as America/Los_Angeles or Europe/London. PEP 615 added this module to the standard library and made the same default: use system data when present, otherwise tzdata.

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Python docs, zoneinfo — IANA time zone support, PSF-2.0 (https://docs.python.org/3/license.html); Python PEPs, PEP 615 – Support for the IANA Time Zone Database in the Standard Library, Public domain or CC0-1.0 (https://peps.python.org/pep-0615/). Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Python docs, zoneinfo — IANA time zone support, PSF-2.0 (https://docs.python.org/3/license.html); Python PEPs, PEP 615 – Support for the IANA Time Zone Database in the Standard Library, Public domain or CC0-1.0 (https://peps.python.org/pep-0615/).

Cite this

Permanent ID: iil:note:qm7m1rdr

iinventedlight. 2026. "zoneinfo.ZoneInfo is the standard-library IANA time zone implementation." iinventedlight Library, iil:note:qm7m1rdr, version of 2026-11-17. https://iinventedlight.com/library/notes/python-zoneinfo/. License: CC-BY-4.0.

@misc{iil_note_qm7m1rdr,
  author = {{iinventedlight}},
  title = {{zoneinfo.ZoneInfo is the standard-library IANA time zone implementation}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-17},
  url = {https://iinventedlight.com/library/notes/python-zoneinfo/},
  note = {Permanent ID iil:note:qm7m1rdr. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/python-zoneinfo.md.