summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
Diffstat (limited to 'library')
-rw-r--r--library/clock.tcl11
1 files changed, 6 insertions, 5 deletions
diff --git a/library/clock.tcl b/library/clock.tcl
index 1152576..d26c2c8 100644
--- a/library/clock.tcl
+++ b/library/clock.tcl
@@ -13,7 +13,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: clock.tcl,v 1.4 2004/09/07 17:38:56 kennykb Exp $
+# RCS: @(#) $Id: clock.tcl,v 1.5 2004/09/10 17:50:15 kennykb Exp $
#
#----------------------------------------------------------------------
@@ -3061,12 +3061,13 @@ proc ::tcl::clock::ConvertUTCToLocalViaC { date } {
# Determine the name and offset of the timezone
- set delta [expr { $localSeconds - $gmtSeconds }]
- if { $delta <= 0 } {
+ set diff [expr { $localSeconds - $gmtSeconds }]
+ if { $diff <= 0 } {
set signum -
- set delta [expr { - $delta }]
+ set delta [expr { - $diff }]
} else {
set signum +
+ set delta $diff
}
set hh [::format %02d [expr { $delta / $SecondsPerHour }]]
set mm [::format %02d [expr { ($delta / $SecondsPerMinute )
@@ -3081,7 +3082,7 @@ proc ::tcl::clock::ConvertUTCToLocalViaC { date } {
# Fix the dictionary
dict set date localSeconds $localSeconds
- dict set date tzOffset $delta
+ dict set date tzOffset $diff
dict set date tzName $zoneName
return $date