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

Live updates to tzdata on a running server #36

Open
articice opened this issue Mar 4, 2018 · 2 comments
Open

Live updates to tzdata on a running server #36

articice opened this issue Mar 4, 2018 · 2 comments

Comments

@articice
Copy link

articice commented Mar 4, 2018

We have a server in NodeJS that runs 24/7, and restarts to load fresh tzdata are not desired.

  • Is it possible to supplement tzdata with a module that queries system tz database (Linux) and its data (updated via distribution package manager)?
  • Is there a hack to NodeJS to reload tzdata into your module after doing npm install tzdata (using cron)?
@rogierschouten
Copy link
Contributor

Hi, good ideas. I think we could use a separate module in the tzdata-xxx family to read the Linux system tzdata. Any chance you could start that?

Off the top of my head: loading data into a running instance is done using tc.TzDatabase.init(customTimeZoneData);; however it may be that it prevents you from calling it twice. Let me know and I'll look into it

@rogierschouten
Copy link
Contributor

@articice I checked and you can indeed call tc.TzDatabase.init(customTimeZoneData) more than once, so there you have your update possibility

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

No branches or pull requests

2 participants