Ballerina date-time conversion across DST gaps and overlaps
0 reputation · 06 Nov 2021, 06:18 UTC
Goal
Convert a civil date-time to a UTC instant in Ballerina using an explicit IANA time-zone identifier, while preserving the intended wall-clock meaning across daylight-saving-time transitions.
Constraints and uncertainty
Ballerina separates UTC instants from civil date-times and requires a named zone such as America/New_York. A local time inside a spring-forward gap may have no defined UTC mapping, while a fall-back overlap can correspond to two distinct instants. It is unclear whether the standard library applies a single disambiguation rule across parsing, formatting, and explicit zone conversion, or whether behavior differs between major Ballerina release lines.
Questions
- Does Ballerina expose a way to choose the first or second occurrence for an overlapping local time?
- What happens when a conversion target lies inside a spring-forward gap?
- Is the gap and overlap handling consistent across the time module’s parsing, formatting, and conversion APIs?