summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2007-04-17 20:33:27 (GMT)
committerKevin B Kenny <kennykb@acm.org>2007-04-17 20:33:27 (GMT)
commit79f95e949c348b6380830c77f049542e91136874 (patch)
treea25167c78e1abefdc98c78a48ce989ddeb4873fd
parent372594a4ce239511deada5573dcbe7e9463e4028 (diff)
downloadtcl-79f95e949c348b6380830c77f049542e91136874.zip
tcl-79f95e949c348b6380830c77f049542e91136874.tar.gz
tcl-79f95e949c348b6380830c77f049542e91136874.tar.bz2
* library/clock.tcl: Fixed the naming of
::tcl::clock::ReadZoneinfoFile because (yoicks!) it was in the global namespace. * doc/clock.n: Clarified the cases in which legacy time zone is recognized. [Bug 1656002]
-rw-r--r--ChangeLog9
-rw-r--r--doc/clock.n16
-rw-r--r--library/clock.tcl8
3 files changed, 21 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index 445f619..d49142a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2007-04-17 Kevin B. Kenny <kennykb@acm.org>
+
+ * library/clock.tcl: Fixed the naming of
+ ::tcl::clock::ReadZoneinfoFile because (yoicks!) it was in the
+ global namespace.
+ * doc/clock.n: Clarified the cases in which legacy time zone is
+ recognized. [Bug 1656002]
+
+
2007-04-17 Miguel Sofer <msofer@users.sf.net>
* generic/tclExecute.c: fixed checkInterp logic [Bug 1702212]
diff --git a/doc/clock.n b/doc/clock.n
index a8ee004..f42ddfb 100644
--- a/doc/clock.n
+++ b/doc/clock.n
@@ -730,10 +730,8 @@ The local time zone from the Control Panel on Windows systems.
The C library's idea of the local time zone, as defined by the
\fBmktime\fR and \fBlocaltime\fR functions.
.PP
-Whatever the source of the time zone string, the same set of rules
-is used to parse it. First, if it was obtained from a \fB%z\fR
-or \fB%Z\fR format group, it is checked to see if it is one of
-the strings,
+In case [1] \fIonly,\fR the string is tested to see if it is one
+of the strings:
.CS
gmt ut utc bst wet wat at
nft nst ndt ast adt est edt
@@ -748,7 +746,9 @@ the strings,
If it is a string in the above list, it designates a known
time zone, and is interpreted as such.
.PP
-The next check is for a string beginning with a colon.
+For time zones in case [1] that do not match any of the above strings,
+and always for cases [2]-[6], the following rules apply.
+.PP
If the time zone begins with a colon, it is one of a
standardized list of names like \fB:America/New_York\fR
that give the rules for various locales. A complete list
@@ -762,18 +762,18 @@ obtained from system files in "\fI/usr/share/zoneinfo\fR",
As a special case, the name \fB:localtime\fR refers to
the local time zone as defined by the C library.
.PP
-A string consisting of a plus or minus sign followed by
+A time zone string consisting of a plus or minus sign followed by
four or six decimal digits is interpreted as an offset in
hours, minutes, and seconds (if six digits are present) from
UTC. The plus sign denotes a sign east of Greenwich;
the minus sign one west of Greenwich.
.PP
-A string conforming to the Posix specification of the \fBTZ\fR
+A time zone string conforming to the Posix specification of the \fBTZ\fR
environment variable will be recognized. The specification
may be found at
\fIhttp://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap08.html\fR.
.PP
-Any other string is processed by prefixing a colon and attempting
+Any other time zone string is processed by prefixing a colon and attempting
to use it as a location name, as above.
.SH "LOCALIZATION"
Developers wishing to localize the date and time formatting and parsing
diff --git a/library/clock.tcl b/library/clock.tcl
index d678a7c..682b019 100644
--- a/library/clock.tcl
+++ b/library/clock.tcl
@@ -9,11 +9,11 @@
#
#----------------------------------------------------------------------
#
-# Copyright (c) 2004 by Kevin B. Kenny. All rights reserved.
+# Copyright (c) 2004,2005,2006,2007 by Kevin B. Kenny
# 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.41 2007/04/15 18:59:34 kennykb Exp $
+# RCS: @(#) $Id: clock.tcl,v 1.42 2007/04/17 20:33:27 kennykb Exp $
#
#----------------------------------------------------------------------
@@ -3519,7 +3519,7 @@ proc ::tcl::clock::LoadZoneinfoFile { fileName } {
#----------------------------------------------------------------------
#
-# LoadZoneinfoFile --
+# ReadZoneinfoFile --
#
# Loads a binary time zone information file in Olson format.
#
@@ -3538,7 +3538,7 @@ proc ::tcl::clock::LoadZoneinfoFile { fileName } {
#----------------------------------------------------------------------
-proc ReadZoneinfoFile {fileName fname} {
+proc ::tcl::clock::ReadZoneinfoFile {fileName fname} {
variable MINWIDE
variable TZData
if { ![info exists fname] } {