Open
Description
Clarification and motivation
At the moment, we're using Data.Time.TZInfo.fromLabel
to fetch the timezone rules for some given timezone.
tzbot/src/TzBot/TimeReference.hs
Lines 140 to 146 in 4c2315e
However, as the haddocks state, this uses the IANA database embedded inside the tzdata
package:
Timezone rules are constantly getting updated and, unless we constantly upgrade the tzdata
dependency to the latest version, eventually we'll be using old timezone rules, leading to wrong conversions.
Instead, we should use the operating system's timezone database, using Data.Time.TZInfo.loadFromSystem
.
Note:
- Let's first check with the SRE team whether the server indeed contains this database, and that it is updated regularly.
loadFromSystem
will not work on Windows. We should document that the server cannot run on Windows.- (we could workaround this by defaulting to using
fromLabel
on windows, but if there's no need to support windows, then it's not worth doing)
- (we could workaround this by defaulting to using
Metadata
Assignees
Labels
No labels