Commit eba348b6 authored by Ben Noordhuis's avatar Ben Noordhuis
Browse files

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

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
PR-URL: https://github.com/nodejs/node/pull/20026


Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarSteven R Loomis <srloomis@us.ibm.com>
Reviewed-By: default avatarTimothy Gu <timothygu99@gmail.com>
parent 58fe440c
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment