racket/time: Ambiguous local time resolution during DST transitions
0 reputation · 07 Sept 2025, 15:02 UTC
The racket/time module provides utilities for converting between UTC and system-local time. However, the library relies on the underlying operating system's time zone configuration and does not provide a first-class TimeZone object or a mechanism to specify target IANA time zone identifiers within conversion calls.
This creates uncertainty when handling dates that fall within daylight saving time (DST) transitions, specifically during the autumn "fold" where a local time occurs twice. Because the API does not offer an explicit way to resolve these ambiguities or specify a fold/gap preference, the behavior is deferred to the system level.
Given a Racket environment (v8.0+) running on a system with DST enabled:
- How does the library resolve ambiguous local times when converting back to UTC?
- Is there a documented method to ensure consistent date offsets across different regional server configurations without modifying the system-wide locale?