summaryrefslogtreecommitdiffstats
path: root/library/clock.tcl
diff options
context:
space:
mode:
authoroehhar <harald.oehlmann@elmicron.de>2015-05-31 19:03:56 (GMT)
committeroehhar <harald.oehlmann@elmicron.de>2015-05-31 19:03:56 (GMT)
commite478e78b30e12b40d4cdced03374bff49e01a3ae (patch)
treef0618ce7e9471e313bb745b49baa42dd3ac01116 /library/clock.tcl
parentf50357637950d7ee913d02d98cfa78ca49bd0e09 (diff)
downloadtcl-e478e78b30e12b40d4cdced03374bff49e01a3ae.zip
tcl-e478e78b30e12b40d4cdced03374bff49e01a3ae.tar.gz
tcl-e478e78b30e12b40d4cdced03374bff49e01a3ae.tar.bz2
clock.tcl modified that all clock tests pass
Diffstat (limited to 'library/clock.tcl')
-rwxr-xr-xlibrary/clock.tcl17
1 files changed, 5 insertions, 12 deletions
diff --git a/library/clock.tcl b/library/clock.tcl
index 982395a..e995bd1 100755
--- a/library/clock.tcl
+++ b/library/clock.tcl
@@ -58,6 +58,8 @@ namespace eval ::tcl::clock {
# Import the message catalog commands that we use.
+ namespace import ::msgcat::mcload
+ namespace import ::msgcat::mclocale
namespace import ::msgcat::mc
namespace import ::msgcat::mcpackagelocale
@@ -1269,7 +1271,6 @@ proc ::tcl::clock::scan { args } {
return [$scanner $string $base $timezone]
} trap CLOCK {result opts} {
# Conceal location of generation of expected errors
-
dict unset opts -errorinfo
return -options $opts $result
}
@@ -2291,16 +2292,12 @@ proc ::tcl::clock::MakeParseCodeFromFields { dateFields parseActions } {
#
# Parameters:
# locale -- Desired locale
-# oldLocaleVar -- Name of a variable in caller's scope that
-# tracks the previous locale name.
#
# Results:
# Returns the locale that was previously current.
#
# Side effects:
-# Does [mclocale]. If necessary, uses [mcload] to load the designated
-# locale's files, and tracks that it has done so in the 'McLoaded'
-# variable.
+# Does [mclocale]. If necessary, loades the designated locale's files.
#
#----------------------------------------------------------------------
@@ -2317,7 +2314,7 @@ proc ::tcl::clock::EnterLocale { locale } {
# Control Panel. First, load the 'current' locale if it's not yet
# loaded
- mcpackagelocale [mclocale]
+ mcpackagelocale set [mclocale]
# Make a new locale string for the system locale, and get the
# Control Panel information
@@ -2512,7 +2509,7 @@ proc ::tcl::clock::LocalizeFormat { locale format } {
lappend list %Ec [string map $list [mc LOCALE_DATE_TIME_FORMAT]]
set format [string map $list $format]
- mcset $locale $key $format
+ ::msgcat::mcset $locale $key $format
return $format
}
@@ -4375,7 +4372,6 @@ proc ::tcl::clock::add { clockval args } {
#----------------------------------------------------------------------
proc ::tcl::clock::AddMonths { months clockval timezone changeover } {
-
variable DaysInRomanMonthInCommonYear
variable DaysInRomanMonthInLeapYear
variable TZData
@@ -4509,9 +4505,6 @@ proc ::tcl::clock::ClearCaches {} {
catch {unset FormatProc}
set LocaleNumeralCache {}
- # this removes many required keys and makes the module unusable
- mcpackagelocale set ""
- mcpackagelocale clear
catch {unset CachedSystemTimeZone}
set TimeZoneBad {}
InitTZData