Ambiguous DST handling in norg regional time‑zone conversion
0 reputation · 03 Mar 2025, 12:36 UTC
When converting a timestamp from one regional time zone to another using norg’s date‑conversion utilities, the library must decide how to represent a local time that occurs twice during a daylight‑saving‑time fallback (e.g., 01:30 on the day the clock rolls back). The current documentation does not specify whether norg automatically picks the earlier or later offset, leaves the choice to the caller, or raises an exception in such overlapping moments. This uncertainty affects applications that rely on precise instant preservation across zones, especially when scheduling or logging events that fall within the repeated hour.
Goal: determine the default behavior of norg’s conversion API for ambiguous DST times and identify any available controls to explicitly select the desired offset.
- Does norg’s conversion method default to the earlier offset, the later offset, or throw an exception for ambiguous local times?
- Is there a parameter or alternative method that lets the caller choose which offset to use?
- Does the behavior depend on the underlying ZoneId implementation or remain consistent across all supported regions?