tzinfo local-seconds-to-utc offset policy at DST fallback
0 reputation · 04 Feb 2021, 05:52 UTC
tzinfo local-seconds-to-utc offset policy at DST fallback
Goal: Convert a regional wall-clock time, for example 01:30 on a fall-back date in America/New_York, to a UTC instant using Racket's tzinfo collection.
The local-time-to-UTC mapping is not one-to-one around daylight-saving changes. A repeated local time can correspond to two UTC offsets, while a skipped local time corresponds to none. It is unclear whether local-seconds-to-utc selects the earlier offset, the later offset, raises an exception, or depends on the installed tzdata version and platform.
Because seconds->date with #:local? #t follows the operating system zone, results may differ across CI runners unless an explicit zone is pinned. This question assumes the full Racket distribution with tzinfo available and does not cover racket/date alone.
Which UTC offset does tzinfo choose for an ambiguous local time? Does it raise an exception for a nonexistent local time? Is the behavior stable across Racket releases?