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

[proposal] Split off updater #71

Closed
cdegroot opened this issue Dec 29, 2018 · 3 comments
Closed

[proposal] Split off updater #71

cdegroot opened this issue Dec 29, 2018 · 3 comments

Comments

@cdegroot
Copy link

cdegroot commented Dec 29, 2018

The discussion about tzdata's unexpected update behaviour came up on Slack again (https://elixir-lang.slack.com/archives/C0AB4A879/p1546084693076000). I think there's a way to have your cake and eat it, too - split off the update logic.

After the split, there'd be two libraries:

  • tzdata which has the pure code, just the time zone access;
  • tzdata_updater which has the side-effecting code that does the updates.

That way, downstream libraries like timex can just depend on the tzdata library and nothing unexpected will happen (nor will maintainers of downstream libraries be forced to make a decision on whether this behaviour is wanted or not - they can't, only the end user can). If someone wants the update behaviour, that is simple enough to accomplish by adding the tzdata_updater dependency as well. No messing around with Mix configs needed.

(needless to say, more than happy to chip in some time to make this happen)

@lau
Copy link
Owner

lau commented Dec 29, 2018

I cannot see the discussion you linked to because it requires a login.

The update behaviour is explained in the readme https://github.com/lau/tzdata#automatic-data-updates It is very easy to change the setting using the config setting config :tzdata, :autoupdate, :disabled

@lau lau closed this as completed Dec 29, 2018
@lau
Copy link
Owner

lau commented Dec 29, 2018

For people that do not bother to read the readme of the libraries the use, I believe that auto updating is the best default. For most people including those that care to read the readmes of the libraries they use, they can choose to disable the auto updating and instead keep up with new tzdata versions every single day and make sure to update to new versions within 24 hours manually.

@cdegroot
Copy link
Author

cdegroot commented Dec 30, 2018 via email

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

No branches or pull requests

2 participants