summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2005-12-02 16:58:13 (GMT)
committerKevin B Kenny <kennykb@acm.org>2005-12-02 16:58:13 (GMT)
commitd6bc14ba28aa20aabb723d9b712d5d7a90e7aa7e (patch)
treec2dda0a86c1fc5c2098c0a3eb1c78273247957b7 /library
parenta2b29e1c84f027668d4a266e8e5767736c760aa4 (diff)
downloadtcl-d6bc14ba28aa20aabb723d9b712d5d7a90e7aa7e.zip
tcl-d6bc14ba28aa20aabb723d9b712d5d7a90e7aa7e.tar.gz
tcl-d6bc14ba28aa20aabb723d9b712d5d7a90e7aa7e.tar.bz2
Bug 1371446 plus buildability on ancient Solaris
Diffstat (limited to 'library')
-rw-r--r--library/clock.tcl24
1 files changed, 12 insertions, 12 deletions
diff --git a/library/clock.tcl b/library/clock.tcl
index c24a589..0c8bdaa 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.25 2005/12/01 22:38:05 kennykb Exp $
+# RCS: @(#) $Id: clock.tcl,v 1.26 2005/12/02 16:58:13 kennykb Exp $
#
#----------------------------------------------------------------------
@@ -652,8 +652,6 @@ proc ::tcl::clock::Initialize {} {
proc ::tcl::clock::format { args } {
- variable TZData
-
set format {}
# Check the count of args
@@ -731,16 +729,10 @@ proc ::tcl::clock::format { args } {
return -options $opts $retval
}
- # Extract the fields of the date.
-
- set date [GetDateFields $clockval \
- $TZData($timezone) \
- [mc GREGORIAN_CHANGE_DATE]]
-
# Format the result
set formatter [ParseClockFormatFormat $format $locale]
- return [$formatter $date $TZData($timezone)]
+ return [$formatter $clockval $timezone]
}
@@ -802,7 +794,15 @@ proc ::tcl::clock::ParseClockFormatFormat2 {format locale procName} {
set didLocaleEra 0
set didLocaleNumerals 0
- set preFormatCode {}
+ set preFormatCode \
+ [string map [list @GREGORIAN_CHANGE_DATE@ \
+ [mc GREGORIAN_CHANGE_DATE]] \
+ {
+ variable TZData
+ set date [GetDateFields $clockval \
+ $TZData($timezone) \
+ @GREGORIAN_CHANGE_DATE@]
+ }]
set formatString {}
set substituents {}
set state {}
@@ -1207,7 +1207,7 @@ proc ::tcl::clock::ParseClockFormatFormat2 {format locale procName} {
}
}
- proc $procName {date changeover} "
+ proc $procName {clockval timezone} "
$preFormatCode
return \[::format [list $formatString] $substituents\]
"