diff options
author | Tanaka Akira <akr@fsij.org> | 2020-01-28 23:40:25 +0900 |
---|---|---|
committer | Tanaka Akira <akr@fsij.org> | 2020-01-28 23:40:25 +0900 |
commit | 338c5b8c1dc061e9f8d21f6d9f5ac053c4497383 (patch) | |
tree | b5cc7143cb75eb026c49f24dc83bf4b859f2c39f /hash.c | |
parent | fb41246ddb2dd3c1b4595cd7e27ed3710def3fc8 (diff) |
Extract a function, ruby_reset_timezone().
Initial implementation of ruby_reset_timezone()
assigns ruby_tz_uptodate_p to false.
Diffstat (limited to 'hash.c')
-rw-r--r-- | hash.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -35,6 +35,7 @@ #include "internal/object.h" #include "internal/proc.h" #include "internal/symbol.h" +#include "internal/time.h" #include "internal/vm.h" #include "probes.h" #include "ruby/st.h" @@ -4758,7 +4759,6 @@ env_str_new2(const char *ptr) } static const char TZ_ENV[] = "TZ"; -extern bool ruby_tz_uptodate_p; static rb_encoding * env_encoding_for(const char *name, const char *ptr) @@ -4843,7 +4843,7 @@ env_delete(VALUE name) * This hack might works only on Linux glibc. */ if (ENVMATCH(nam, TZ_ENV)) { - ruby_tz_uptodate_p = FALSE; + ruby_reset_timezone(); } if (val) { @@ -5275,7 +5275,7 @@ env_aset(VALUE nm, VALUE val) RB_GC_GUARD(nm); } else if (ENVMATCH(name, TZ_ENV)) { - ruby_tz_uptodate_p = FALSE; + ruby_reset_timezone(); } return val; } |