summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorsebres <sebres@users.sourceforge.net>2017-01-10 22:33:41 (GMT)
committersebres <sebres@users.sourceforge.net>2017-01-10 22:33:41 (GMT)
commit590e25c971a4f7a6663c82a6c901500c72012cea (patch)
tree27addef80969d03667baa38a1f7d9c9c704a80a8 /library
parent6795fcaa4965863daab7cdaa16fff4b551044586 (diff)
downloadtcl-590e25c971a4f7a6663c82a6c901500c72012cea.zip
tcl-590e25c971a4f7a6663c82a6c901500c72012cea.tar.gz
tcl-590e25c971a4f7a6663c82a6c901500c72012cea.tar.bz2
repaired system/current locale caching (also for legacy clock format) and legacy timezone cached as last
Diffstat (limited to 'library')
-rwxr-xr-xlibrary/clock.tcl24
1 files changed, 13 insertions, 11 deletions
diff --git a/library/clock.tcl b/library/clock.tcl
index d4e29d5..f874e4d 100755
--- a/library/clock.tcl
+++ b/library/clock.tcl
@@ -2352,7 +2352,7 @@ proc ::tcl::clock::LocalizeFormat { locale format {fmtkey {}} } {
}] } {
# message catalog dictionary:
- set mcd [::msgcat::mcget ::tcl::clock $locale]
+ set mcd [mcget $locale]
# Handle locale-dependent format groups by mapping them out of the format
# string. Note that the order of the [string map] operations is
@@ -3021,21 +3021,23 @@ proc ::tcl::clock::SetupTimeZone { timezone {alias {}} } {
variable LegacyTimeZone
- # Check may be a legacy zone:
- if { $alias eq {} && ![catch {
- set tzname [dict get $LegacyTimeZone [string tolower $timezone]]
- }] } {
- set tzname [::tcl::clock::SetupTimeZone $tzname $timezone]
- set TZData($timezone) $TZData($tzname)
- # tell backend - timezone is initialized and return shared timezone object:
- return [configure -setup-tz $timezone]
- }
-
# We couldn't parse this as a POSIX time zone. Try again with a
# time zone file - this time without a colon
if { [catch { LoadTimeZoneFile $timezone }]
&& [catch { LoadZoneinfoFile $timezone } - opts] } {
+
+ # Check may be a legacy zone:
+
+ if { $alias eq {} && ![catch {
+ set tzname [dict get $LegacyTimeZone [string tolower $timezone]]
+ }] } {
+ set tzname [::tcl::clock::SetupTimeZone $tzname $timezone]
+ set TZData($timezone) $TZData($tzname)
+ # tell backend - timezone is initialized and return shared timezone object:
+ return [configure -setup-tz $timezone]
+ }
+
dict unset opts -errorinfo
dict set TimeZoneBad $timezone 1
return -options $opts "time zone $timezone not found"