Skip to content

src: make process.env.TZ setter clear tz cache

Rodrigo Muino Tomonari requested to merge github/fork/bnoordhuis/fix19974 into master

Since the presence of the libc and V8 timezone caches seem to be a perennial source of confusion to users ("why doesn't it work?!"), let's try to support that pattern by intercepting assignments to the TZ environment variable and reset the caches as a side effect.

Fixes: https://github.com/nodejs/node/issues/19974 CI: https://ci.nodejs.org/job/node-test-pull-request/14278/ - I expect the results will be... interesting. CI: https://ci.nodejs.org/job/node-test-pull-request/14280/ - with tweaks CI: https://ci.nodejs.org/job/node-test-pull-request/14287/ - one more tweak CI: https://ci.nodejs.org/job/node-test-pull-request/23223/ CI: https://ci.nodejs.org/job/node-test-pull-request/23228/ CI: https://ci.nodejs.org/job/node-test-pull-request/23249/

Merge request reports

Loading