Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with Iana version 2023a #16

Closed
pggalaviz opened this issue Mar 22, 2023 · 5 comments
Closed

Error with Iana version 2023a #16

pggalaviz opened this issue Mar 22, 2023 · 5 comments
Labels
bug Something isn't working high priority

Comments

@pggalaviz
Copy link

When downloading version 2023a of database and compiling, an error is raised:

** (EXIT) an exception was raised:
        ** (RuntimeError) unexpected case: 3 ongoing rules for rule "Palestine"
            (tz 0.24.0) lib/tz/compiler.ex:25: anonymous fn/1 in Tz.Compiler.compile/0
            (elixir 1.14.1) lib/enum.ex:980: anonymous fn/3 in Enum.each/2
            (stdlib 4.1.1) maps.erl:411: :maps.fold_1/3
            (elixir 1.14.1) lib/enum.ex:2480: Enum.each/2
            (tz 0.24.0) lib/tz/compiler.ex:22: anonymous fn/3 in Tz.Compiler.compile/0
            (elixir 1.14.1) lib/enum.ex:2468: Enum."-reduce/3-lists^foldl/2-0-"/3
            (tz 0.24.0) lib/tz/compiler.ex:18: Tz.Compiler.compile/0
            (tz 0.24.0) lib/tz/updater.ex:21: Tz.Updater.maybe_recompile/0
            (tz 0.24.0) lib/tz/update_periodically.ex:26: Tz.UpdatePeriodically.init/1
            (stdlib 4.1.1) gen_server.erl:851: :gen_server.init_it/2
            (stdlib 4.1.1) gen_server.erl:814: :gen_server.init_it/6
            (stdlib 4.1.1) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
@mathieuprog
Copy link
Owner

Interesting! I'll be on this asap

@mathieuprog mathieuprog added bug Something isn't working high priority labels Mar 23, 2023
@shawnleong
Copy link

shawnleong commented Mar 23, 2023

@mathieuprog I'm getting a similar issue too.

%RuntimeError{message: "unexpected case: 3 ongoing rules for rule \"Palestine\""}

Are there any workarounds you would suggest at the moment?
* Perhaps revert to an older version of the timezone via a manual mix tz command?

Update:
This is my workraound.
Remove/comment out any lines in application.ex that have to do with periodically updating with the latest IANA should revert back to the precompiled version stated in this repo (2022f) rather than the latest IANA tzdb (2023a).

# |> append_if(Application.get_env(:my_app, :env) != :test, {Tz.UpdatePeriodically, []})

@mathieuprog
Copy link
Owner

It's being worked on now. Be back with updates.

@mathieuprog
Copy link
Owner

@pggalaviz @shawnleong could you try 0.25 🙏?

@shawnleong
Copy link

shawnleong commented Mar 23, 2023

@mathieuprog Thanks! 🙏

Just tried 0.25. Seems to work just fine based on the logs. I don't see the %RuntimeError{} anymore 👍

[info]16:35:48.485 [info] Latest version of the IANA time zone data is 2023a module=Tz.Updater function=fetch_latest_iana_tz_version/0 line=59

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working high priority
Projects
None yet
Development

No branches or pull requests

3 participants