Skip to content
Astera Technology

Resolve a local time repeated by daylight saving

Keep a named zone and the chosen offset when a local clock time can mean two different instants.

Distinguish the two occurrences

Python zoneinfo documents the fold flag for ambiguous times. Assigning a zone by itself does not prove a local time exists. This example uses the documented 2020 Los Angeles fall-back transition; the year and zone are deliberately fixed.

Worked Los Angeles repeated-time example
Local inputSelected offsetUTC instant
2020-11-01 01:00, America/Los_AngelesFirst occurrence: -07:002020-11-01T08:00:00Z
Same local clock timeSecond occurrence: -08:002020-11-01T09:00:00Z
No offset/occurrence selectedUnresolvedDo not silently choose
Download editable CSV ↓

Round-trip the chosen instant

For future appointments keep the intended local date/time and named zone as well as the resolved instant. Check transition cases with a timezone-aware library and its current data. A local time in a spring-forward gap needs a correction choice, not a guessed automatic shift.

Two systems exchange only “01:00” on this date. Can they agree on the instant?

Show the worked answer

No. Include the date, zone and selected offset/occurrence. The two valid occurrences in this example are one hour apart.

Related resources