diff options
author | Nobuyoshi Nakada <[email protected]> | 2025-02-17 21:46:47 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2025-02-19 18:27:32 +0900 |
commit | 3f07bc76ff6a11232d9f18e5eaa31835c195e8f0 () | |
tree | f94ee52c712179414e6295338af79f57b30e20c5 /hash.c | |
parent | bd84c75a013042f4feefa4616ab119394b3bbf24 (diff) |
[Bug #21144] Win32: Use Windows time zone ID if TZ is not set
If the TZ environment variable is not set, the time zone names retrieved from the system are localized for UI display and may vary across editions and language packs for the same time zone. Use the time zone IDs that are invariant across environments instead.
Notes: Merged: https://.com/ruby/ruby/pull/12765
-rw-r--r-- | hash.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -5016,7 +5016,7 @@ env_name(volatile VALUE *s) static VALUE env_aset(VALUE nm, VALUE val); static void -reset_by_modified_env(const char *nam) { /* * ENV['TZ'] = nil has a special meaning. @@ -5025,7 +5025,7 @@ reset_by_modified_env(const char *nam) * This hack might works only on Linux glibc. */ if (ENVMATCH(nam, TZ_ENV)) { - ruby_reset_timezone(); } } @@ -5033,7 +5033,7 @@ static VALUE env_delete(VALUE name) { const char *nam = env_name(name); - reset_by_modified_env(nam); VALUE val = getenv_with_lock(nam); if (!NIL_P(val)) { @@ -5439,7 +5439,7 @@ env_aset(VALUE nm, VALUE val) get_env_ptr(value, val); ruby_setenv(name, value); - reset_by_modified_env(name); return val; } |