Commit Graph

4 Commits

Author SHA1 Message Date
Ben Noordhuis
2bb93e1108 test: set LC_ALL to known good value
Set the locale to a known good value because it affects ICU's date
string formatting. Setting LC_ALL needs to happen before the first
call to `icu::Locale::getDefault()` because ICU caches the result.

Fixes: https://github.com/nodejs/node/issues/27856

PR-URL: https://github.com/nodejs/node/pull/28096
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com>
2019-06-25 10:37:27 -07:00
Ben Noordhuis
eba348b6ae 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: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Steven R Loomis <srloomis@us.ibm.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
2019-05-23 11:34:17 +02:00
Ruben Bridgewater
e767aa1a2e
Revert "src: make process.env.TZ setter clear tz cache"
This reverts commit 1d1ab76e17.

PR-URL: https://github.com/nodejs/node/pull/20228
Fixes: https://github.com/nodejs/node/issues/20227
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-23 23:39:30 +02:00
Ben Noordhuis
1d1ab76e17
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.

PR-URL: https://github.com/nodejs/node/pull/20026
Fixes: https://github.com/nodejs/node/issues/19974
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-23 15:53:10 +02:00