Skip to main content

Time zone transitions table + DST test vectors (IANA tzdata, 1970-2050)

tests

A database-ready table of every UTC offset change (DST start/end and permanent offset changes) for IANA time zones, and DST edge-case test vectors for testing date-time code: nonexistent local times in spring-forward gaps, ambiguous times in fall-back overlaps, 30-minute DST (Lord Howe), +12:45/+13:45 (Chatham), changes at midnight (Havana).

Generated by script from the public-domain IANA tz database (tzdata 2026f) and checked against zdump, Python zoneinfo and JavaScript Intl. Made by Plainfold with AI assistance. Not affiliated with IANA.

Reference pages

Daylight saving time dates by country, by year, generated from the same tzdata.

Guides

Python package: dst-test-vectors

Test your own time zone code against the vectors. Standard library only, Python 3.10+. On PyPI: https://pypi.org/project/dst-test-vectors/

pip install dst-test-vectors
import dst_test_vectors as dtv

dtv.is_nonexistent("2026-03-08T02:30:00", "America/New_York")  # True: spring-forward gap
dtv.is_ambiguous("2026-11-01T01:30:00", "America/New_York")    # True: fall-back overlap

# Your function: (zone, naive local datetime) -> aware UTC datetime
def my_to_utc(zone, local): ...

assert dtv.check(my_to_utc) == []                     # "compatible" policy: earlier instant in overlaps, shift gaps forward
dtv.check(my_to_utc, policy="raise")                  # gaps must raise
dtv.check(my_to_utc, policy="later", zone="Europe/London")

# pytest
# @pytest.mark.parametrize("zone,local,expected", dtv.params(kind="gap"))

dtv.cases(zone=..., kind="gap"|"overlap"|"normal", tag="midnight"|"odd_offset"|"delta_30min", year=...) returns the bundled cases (the 36-case 2026 sample below). dtv.load(path) / cases(path=...) read any file in the same format, such as the full set's dst_test_vectors.json. CLI: dst-test-vectors --zone Pacific/Chatham, and dst-test-vectors --check to check this machine's zoneinfo (the helpers use your local tz database or the tzdata package; vectors are built from tzdata 2026f, so an older database can disagree, e.g. Cuba's 2026 rules).

Free sample (this repo)

File What
sample/transitions_sample_2026_2030.csv 118 transitions, 2026-2030, for 12 of these 16 zones: New York, Chicago, Denver, Los Angeles, Sao Paulo, London, Berlin, Kolkata, Tokyo, Sydney, Lord Howe, Auckland, Chatham, Havana, Tehran, Cairo (Sao Paulo, Kolkata, Tokyo and Tehran have no changes in 2026-2030; they are in the zones file)
sample/zones_sample.csv Those 16 zones: countries, coordinates, offset at 1970, 2026 winter/summer offsets
sample/dst_test_vectors_sample.json 36 DST test cases for 2026 in 5 zones
src/dst_test_vectors/ The dst-test-vectors package (bundles the same 36 cases)
tests/test_vectors.py, tests/check_vectors.mjs Check the vectors with Python zoneinfo and JavaScript Intl (no dependencies); copy them to test your own code

Columns of the transitions table: zone, utc, unix, local_before, local_after, offset_before_s, offset_after_s, delta_s, dst_before_s, dst_after_s, is_dst_after, abbr_before, abbr_after, kind (gap, overlap, no_offset_change). Offsets are seconds east of UTC. DST columns follow tzdata, which uses negative DST for Europe/Dublin and Africa/Casablanca, so use dst_after_s > 0 for "summer time in effect".

Find the offset in effect at an instant: take the zone's latest row with utc <= t and use offset_after_s; before the first row, use the zone's offset at 1970.

Full set ($15, one-time)

Buy the full set on Polar (Polar is the merchant of record and handles sales tax). It contains:

  • all 21,026 transitions 1970-2050 (280 of the 344 canonical zones change in that span; the zones table lists all 344), as CSV, SQLite and Parquet; zones table; 253 links (aliases)
  • 51,404 DST test vectors for 2000-2050, every zone, tagged (odd_offset, delta_30min, midnight, crosses_date, ...)
  • PostgreSQL loader with a tz_offset_s(zone, timestamptz) function and a MySQL/MariaDB loader (both tested), SQL Server script
  • the generator, to rebuild from any newer tzdata, and the full test suite (every transition matches zdump)

Also sold as part of the calendar data bundle: this pack plus the other two Plainfold calendar data packs (business days, date dimension, time zone transitions) for $35 instead of $49.

Limits

  • Future rows follow rules announced as of the tzdata release; governments change rules several times a year.
  • The tz database is not a historical reference before 1970.

License

Code: MIT. Data: CC0 1.0 (public domain). Questions: plainfoldhq@proton.me.

Metadata

Release files for dst-test-vectors 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dst-test-vectors 0.1.1
File Size Uploaded Provenance Actions
dst_test_vectors-0.1.1.tar.gz 14.5 kB With provenance Details for dst_test_vectors-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dst-test-vectors 0.1.1
File Interpreter ABI Platform Actions
dst_test_vectors-0.1.1-py3-none-any.whl Python 3 none any Details for dst_test_vectors-0.1.1-py3-none-any.whl

Total release size: 25.0 kB

Release files / dst_test_vectors-0.1.1.tar.gz

Download URL dst_test_vectors-0.1.1.tar.gz
Size 14.5 kB
Tags Source
SHA-256 checksum
How to use checksums
633b5c93ade2b87a3c31508dcd0d465bf8fd6d24f488715684c443b9f6ba55ce
BLAKE2b-256 checksum
How to use checksums
d2ce06e8049c2fcb2f810d4f75669e876fdd4334c5bca2c297331754e430795a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

Release files / dst_test_vectors-0.1.1-py3-none-any.whl

Download URL dst_test_vectors-0.1.1-py3-none-any.whl
Size 10.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
65bde807dc0b07ea6c3f4d2be9a6ab6b8375aa6d81dc4cefb95afedb1f6560b2
BLAKE2b-256 checksum
How to use checksums
2d06dfcd56bb9b0a579e0d1268cc9051822c34a8622c13c27da452af6e375d8b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

Security for dst-test-vectors 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for dst_test_vectors-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page