summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-02-23 07:23:29 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-02-23 07:23:29 (GMT)
commit8242d1a544d685846fe49557be8c9fd628d42329 (patch)
tree1f426b6cd5ab89ab92e196d98f08898aa6866c89 /library
parent7bfe776283e21b9f434c9b47c2ac37b8451f41e8 (diff)
downloadtcl-8242d1a544d685846fe49557be8c9fd628d42329.zip
tcl-8242d1a544d685846fe49557be8c9fd628d42329.tar.gz
tcl-8242d1a544d685846fe49557be8c9fd628d42329.tar.bz2
Use _wgetenv() in stead of getenv() on Windows: The wide environment is not always well-synchonized with the locale environment. Problem detected on the sebres-8-6-clock-speedup-cr2, but this branch only exposed the bug, it did not cause it.
Diffstat (limited to 'library')
-rw-r--r--library/clock.tcl3
1 files changed, 1 insertions, 2 deletions
diff --git a/library/clock.tcl b/library/clock.tcl
index 273b534..aa5d228 100644
--- a/library/clock.tcl
+++ b/library/clock.tcl
@@ -2988,8 +2988,7 @@ proc ::tcl::clock::GetSystemTimeZone {} {
set timezone $result
} elseif {[set result [getenv TZ]] ne {}} {
set timezone $result
- }
- if {![info exists timezone]} {
+ } else {
# Cache the time zone only if it was detected by one of the
# expensive methods.
if { [info exists CachedSystemTimeZone] } {