You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Node.js Version: v10.15.3 (LTS)
OS: All Operating Systems
Scope: Code / Install
Module: Internal Handling of IANA Timezone Data
I would like to know how Node.js obtains IANA timezone data. In particular, I'd would like to know whether Node.js uses its own copy of timezone data as part of the Node.js installation, or it accesses timezone data provided with the OS.
Why is this important? The IANA timezone database is updated periodically to reflect changes made by political bodies to time zone boundaries, UTC offsets, and daylight-saving rules (latest update March 25th 2019). So, when the data changes do I need update the Node.js version installed or is it good enough to take care of OS updates?
A related question: Does the Node.js code uses the ICU library to access timezone data or does it use/implement a different library/module for this purpose?
What, if Node.js has been built with the "system-icu" flag? As the Node.js uses a pre-installed icu library in this case, would it be possible to update that library independently from Node.js?
Activity
[-]How does Node.js obtain IANA Timzone data?[/-][+]How does Node.js obtain IANA Timezone data?[/+]bnoordhuis commentedon Apr 8, 2019
Node.js gets its timezone data from ICU and ICU has its own tzdata, it doesn't query external files or the operating system.
The copy of ICU that is bundled with Node.js is periodically updated.
mwittig commentedon Apr 8, 2019
Thank you very much for the feedback.
What, if Node.js has been built with the "system-icu" flag? As the Node.js uses a pre-installed icu library in this case, would it be possible to update that library independently from Node.js?
bnoordhuis commentedon Apr 9, 2019
Yes, that should work. The system-icu flag links Node.js to ICU dynamically rather than statically.
mwittig commentedon Apr 10, 2019
Thanks you very much again for answering my questions. I am closing this now.