birl
birl copied to clipboard
Time Zones do not Account for DST
The following code
birl.from_unix(1_711_456_116) |> birl.set_timezone("America/New_York") |> birl.to_iso8601 |> io.debug
produces 2024-03-26T07:28:36.000-05:00
when it should produce 2024-03-26T08:28:36.000-04:00
because America/New_York is in EDT time right now, which has the offset of -04:00. Between sometime in March and sometime in November each year in America the timezone offset values changes to an hour ahead because of Daylight Saving Time.