ysangkok / haskell-tzdata

Forked to update to newer tzdb and use different dependencies
Apache License 2.0
4 stars 1 forks source link

Get a comprehensive canonical list of TZLabels #5

Closed ysangkok closed 8 months ago

ysangkok commented 10 months ago

Since I started deduping TZLabels, I chose a bunch of arbitrary names. This could really be done more systemically.

% cabal repl -b tzdata
Resolving dependencies...
Build profile: -w ghc-9.8.1 -O1
In order, the following will be built (use -v for more details):
 - tzdata-0.2.20231222.0 (lib) (requires build)
 - fake-package-0 (lib) (first run)
Starting     tzdata-0.2.20231222.0 (lib)
Building     tzdata-0.2.20231222.0 (lib)
Installing   tzdata-0.2.20231222.0 (lib)
Completed    tzdata-0.2.20231222.0 (lib)
Configuring library for fake-package-0..
Warning: No exposed modules
GHCi, version 9.8.1: https://www.haskell.org/ghc/  :? for help
Loaded GHCi configuration from /tmp/cabal-repl.-12638/setcwd.ghci
ghci> :m +Data.Time.Zones.DB
ghci> :set -XOverloadedStrings 

For some labels, it's fine, I think:

ghci> fromTZName "Asia/Tel_Aviv"
Just Asia__Jerusalem

But for others, it's a bit weird:

ghci> fromTZName "Indian/Reunion"
Just Asia__Dubai

Not sure if there is a better canonical label than Dubai.

ysangkok commented 8 months ago

Closing since I removed deduping with release 2024a.