Resolves gaps/folds using the requested policy and checks UTC range.
Signature
to_timestamp :: (
zone: Time_Zone,
wall: Date_Time,
disambiguation := Disambiguation.COMPATIBLE
) -> (Timestamp, Time_Error)
zone, zone_error := time_zone_from_posix("EST5EDT,M3.2.0,M11.1.0");
assert(zone_error.kind == .NONE);
defer time_zone_free(*zone);
gap := Date_Time.{ .{ 2024, 3, 10 }, .{ 2, 30, 0, 0 } };
instant, error := to_timestamp(zone, gap);
assert(error.kind == .NONE && instant.seconds == 1710055800);
_, rejected := to_timestamp(zone, gap, .REJECT);
assert(rejected.kind == .GAP);