summaryrefslogtreecommitdiffstats
path: root/library/clock.tcl
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2016-04-20 16:44:13 (GMT)
committerdgp <dgp@users.sourceforge.net>2016-04-20 16:44:13 (GMT)
commit1bbd13e8395085f6afe23f0ac7d7cc91eae3cade (patch)
treedeba5d0dcb60194537aea304ca412bd52ef3c1b6 /library/clock.tcl
parent66032e8a327e0498b0d8970307452f66c69be25c (diff)
parent049650b5952e5e5ee1997772750450305dccc6d7 (diff)
downloadtcl-little.zip
tcl-little.tar.gz
tcl-little.tar.bz2
Merge 8.6.5little
Diffstat (limited to 'library/clock.tcl')
-rwxr-xr-xlibrary/clock.tcl36
1 files changed, 36 insertions, 0 deletions
diff --git a/library/clock.tcl b/library/clock.tcl
index bfdf832..8e4b657 100755
--- a/library/clock.tcl
+++ b/library/clock.tcl
@@ -111,6 +111,7 @@ proc ::tcl::clock::Initialize {} {
mcpackagelocale set {}
::msgcat::mcpackageconfig set mcfolder [file join $LibDir msgs]
::msgcat::mcpackageconfig set unknowncmd ""
+ ::msgcat::mcpackageconfig set changecmd ChangeCurrentLocale
# Define the message catalog for the root locale.
@@ -4475,6 +4476,41 @@ proc ::tcl::clock::AddDays { days clockval timezone changeover } {
#----------------------------------------------------------------------
#
+# ChangeCurrentLocale --
+#
+# The global locale was changed within msgcat.
+# Clears the buffered parse functions of the current locale.
+#
+# Parameters:
+# loclist (ignored)
+#
+# Results:
+# None.
+#
+# Side effects:
+# Buffered parse functions are cleared.
+#
+#----------------------------------------------------------------------
+
+proc ::tcl::clock::ChangeCurrentLocale {args} {
+ variable FormatProc
+ variable LocaleNumeralCache
+ variable CachedSystemTimeZone
+ variable TimeZoneBad
+
+ foreach p [info procs [namespace current]::scanproc'*'current] {
+ rename $p {}
+ }
+ foreach p [info procs [namespace current]::formatproc'*'current] {
+ rename $p {}
+ }
+
+ catch {array unset FormatProc *'current}
+ set LocaleNumeralCache {}
+}
+
+#----------------------------------------------------------------------
+#
# ClearCaches --
#
# Clears all caches to reclaim the memory used in [clock]