diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-02-22 15:39:59 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-02-22 15:39:59 (GMT) |
commit | 6caf32205752b3ee1e08cc4c19db4818dcd38f68 (patch) | |
tree | 6d0ed5a650355af2cc67d8e2e5b681fefe24664a /library | |
parent | 3da138a42931159eb283ff3fae50444798c3e4f6 (diff) | |
download | tcl-6caf32205752b3ee1e08cc4c19db4818dcd38f68.zip tcl-6caf32205752b3ee1e08cc4c19db4818dcd38f68.tar.gz tcl-6caf32205752b3ee1e08cc4c19db4818dcd38f68.tar.bz2 |
Better solution for msvc OPTS=static,msvcrt regression: On win32 we cannot thrust the getenv() function, so use _wgetenv()
Diffstat (limited to 'library')
-rw-r--r-- | library/clock.tcl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/library/clock.tcl b/library/clock.tcl index 68dd1c4..529a4f9 100644 --- a/library/clock.tcl +++ b/library/clock.tcl @@ -905,10 +905,10 @@ proc ::tcl::clock::LocalizeFormat { locale format mcd } { proc ::tcl::clock::GetSystemTimeZone {} { variable TimeZoneBad - if {[info exist ::env(TCL_TZ)]} { - set timezone $::env(TCL_TZ) - } elseif {[info exist ::env(TZ)]} { - set timezone $::env(TZ) + if {[set result [getenv TCL_TZ]] ne {}} { + set timezone $result + } elseif {[set result [getenv TZ]] ne {}} { + set timezone $result } else { # ask engine for the cached timezone: set timezone [configure -system-tz] |