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

Time zone data doesn't update at start #38

Open
mathieuprog opened this issue Jul 19, 2022 · 3 comments
Open

Time zone data doesn't update at start #38

mathieuprog opened this issue Jul 19, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@mathieuprog
Copy link

The setting config :time_zone_info, update: :daily doesn't check for updates at start, right? Users need to wait a day before getting the latest update. Eg I'm now stuck with 2021e.
Might have missed something.

@NickNeck
Copy link
Member

Hi @mathieuprog

It was intended that :daily does no update on startup. I want to prevent a tzdb request from being made at every startup. I thought it would be enough if the actual time_zone_info lib always contains the actual tzdb. Especially when I forget to make an update.

You can force an update with:

TimeZoneInfo.update(:force)

Next time I work on TimeZoneInfo I will add update: :on_startup and update: [:on_startup, :daily].

@NickNeck NickNeck added the enhancement New feature or request label Jul 19, 2022
@mathieuprog
Copy link
Author

I want to prevent a tzdb request from being made at every startup

What is the reason?

@NickNeck
Copy link
Member

Good question. There was a mistake in my head. I wanted to prevent that in projects that use the library in dev and test always a request is made. But for dev and test you can set :disabled of course. Then TimeZoneInfo can make a request at startup when :daily is set.

So in the end update: :daily should also update at startup.

Thanks for reporting and asking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants