tzdata

2025.3 · active · verified Sat Mar 28

tzdata is a data-only Python package containing zic-compiled binaries for the IANA time zone database, maintained by the CPython core developers. It serves as a cross-platform fallback for the standard library's zoneinfo module (Python 3.9+, PEP 615) on systems that lack system-level zone data — most critically Windows. The current version is 2025.3 (wrapping upstream IANA tzdata 2025c). Releases track IANA upstream closely, typically producing between 3 and 10+ releases per year in response to real-world timezone rule changes.

Warnings

Install

Imports

Quickstart

Basic cross-platform timezone-aware datetime using zoneinfo backed by tzdata. No auth or env vars required — tzdata is pure data.

# tzdata acts as a silent fallback — no explicit import required for end users.
# Install tzdata, then use zoneinfo normally:
from datetime import datetime
from zoneinfo import ZoneInfo

# Works on all platforms (including Windows) once tzdata is installed
dt_ny = datetime.now(ZoneInfo('America/New_York'))
dt_utc = datetime.now(ZoneInfo('UTC'))
print(f'New York : {dt_ny}')
print(f'UTC      : {dt_utc}')

# Check which IANA version is bundled
import tzdata
print(f'IANA tzdata version: {tzdata.IANA_VERSION}')

# Verify tzdata is active as the data source (useful on Windows / minimal containers)
from zoneinfo import available_timezones
print(f'Available zones: {len(available_timezones())}')

view raw JSON →