summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorsebres <sebres@users.sourceforge.net>2017-01-10 22:04:49 (GMT)
committersebres <sebres@users.sourceforge.net>2017-01-10 22:04:49 (GMT)
commitc093e76184fc3101487abf86878fcc8e85a77cd9 (patch)
tree99b2b744d045a8c1c5eae50360e41ee74b987d2a /library
parentf70ebac8b8c9c01999150364b4155b0d50911cbc (diff)
downloadtcl-c093e76184fc3101487abf86878fcc8e85a77cd9.zip
tcl-c093e76184fc3101487abf86878fcc8e85a77cd9.tar.gz
tcl-c093e76184fc3101487abf86878fcc8e85a77cd9.tar.bz2
[temp-commit]: ClockFreeScan back-ported (cherry picked), all tests case passed + several new test-cases for bug fixing implemented here;
environment epoch ported, several fixes for the time zone / tzdata caching ported; mem-leak fix + memory leak test cases passed
Diffstat (limited to 'library')
-rwxr-xr-xlibrary/clock.tcl12
1 files changed, 9 insertions, 3 deletions
diff --git a/library/clock.tcl b/library/clock.tcl
index b4a7639..ace4176 100755
--- a/library/clock.tcl
+++ b/library/clock.tcl
@@ -671,7 +671,9 @@ proc ::tcl::clock::format { args } {
# Get the data for time changes in the given zone
if {$timezone eq ""} {
- set timezone [GetSystemTimeZone]
+ if {[set timezone [configure -system-tz]] eq ""} {
+ set timezone [GetSystemTimeZone]
+ }
}
if {![info exists TZData($timezone)]} {
if {[catch {SetupTimeZone $timezone} retval opts]} {
@@ -1202,7 +1204,9 @@ proc ::tcl::clock::__org_scan { args } {
set format {}
set gmt 0
set locale c
- set timezone [GetSystemTimeZone]
+ if {[set timezone [configure -system-tz]] eq ""} {
+ set timezone [GetSystemTimeZone]
+ }
# Pick up command line options.
@@ -4083,7 +4087,9 @@ proc ::tcl::clock::add { clockval args } {
set offsets {}
set gmt 0
set locale c
- set timezone [GetSystemTimeZone]
+ if {[set timezone [configure -system-tz]] eq ""} {
+ set timezone [GetSystemTimeZone]
+ }
foreach { a b } $args {
if { [string is integer -strict $a] } {