Skip to content

fix: use tzcalendar.from_calendar for IANA timezone resolution#42

Merged
veeso merged 2 commits intomainfrom
fix/iana-timezone-resolution
Mar 25, 2026
Merged

fix: use tzcalendar.from_calendar for IANA timezone resolution#42
veeso merged 2 commits intomainfrom
fix/iana-timezone-resolution

Conversation

@veeso
Copy link
Copy Markdown
Owner

@veeso veeso commented Mar 25, 2026

Summary

  • Replace the broken resolve-to-offset approach for IANA timezone names (e.g. Europe/Helsinki) with tzcalendar.from_calendar, which correctly handles DST transitions, ambiguous times (fall-back), and invalid times (spring-forward)
  • UTC offset parsing (e.g. +02:00) remains unchanged via tempo
  • Removes the resolve_tz_name, resolve_offset, and format_offset helper functions that were part of the flawed approach

veeso added 2 commits March 25, 2026 17:28
Replace the broken resolve-to-offset approach that could produce
incorrect results around DST transitions. The new implementation
uses tzcalendar.from_calendar which properly handles ambiguous
and invalid local times.
@cocogitto-bot
Copy link
Copy Markdown

cocogitto-bot Bot commented Mar 25, 2026

✔️ 99398e7...1af665e - Conventional commits check succeeded.

@veeso veeso merged commit 77e09f1 into main Mar 25, 2026
3 checks passed
@veeso veeso deleted the fix/iana-timezone-resolution branch March 25, 2026 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant