summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2004-09-08 15:55:42 (GMT)
committerKevin B Kenny <kennykb@acm.org>2004-09-08 15:55:42 (GMT)
commitb53a04548e71d0ecf88493b1b5b78befc220ee32 (patch)
treeae9d77def8c17452675c9a5904571fdf36e17289
parent30204f6dca832947b87b204f4fb74bccbd0be640 (diff)
downloadtcl-b53a04548e71d0ecf88493b1b5b78befc220ee32.zip
tcl-b53a04548e71d0ecf88493b1b5b78befc220ee32.tar.gz
tcl-b53a04548e71d0ecf88493b1b5b78befc220ee32.tar.bz2
fixed clock-34.* to use same time zone on input and output
-rw-r--r--ChangeLog11
-rw-r--r--tests/clock.test18
2 files changed, 18 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index 99f44b5..46de786 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,8 +4,15 @@
[Bug 1024058]
* generic/tclClock.c (TclClockMktimeObjCmd): Fixed a bug where
the month was scanned incorrectly in -timezone :localtime.
- * tests/clock.test (clock-40.1): Added regression test case for
- the bug where month was scanned incorrectly in -timezone :localtime.
+ * tests/clock.test (clock-34.*,clock-40.1): Adjusted the
+ clock-34.* test cases so that the consistency check is performed
+ in :localtime rather than the current time zone. This change
+ allows dealing with issues where the C library has a different
+ idea of DST conversion than Tcl. (Real fix would be to break
+ TclGetDate into separate parser and time converter, and do
+ the time conversion in clock.tcl. That's for another day.)
+ Added regression test case for the bug where month was scanned
+ incorrectly in -timezone :localtime.
2004-09-07 David Gravereaux <davygrvy@pobox.com>
diff --git a/tests/clock.test b/tests/clock.test
index 15647d9..4057aa2 100644
--- a/tests/clock.test
+++ b/tests/clock.test
@@ -11,7 +11,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.test,v 1.41 2004/09/08 15:38:35 kennykb Exp $
+# RCS: @(#) $Id: clock.test,v 1.42 2004/09/08 15:55:43 kennykb Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -34966,7 +34966,7 @@ test clock-34.5 {clock scan tests} {
} {02/14/92 12:20:00 PM}
test clock-34.6 {clock scan tests} {
set time [clock scan "Oct 23,1992 15:00"]
- clock format $time -format {%b %d,%Y %H:%M}
+ clock format $time -format {%b %d,%Y %H:%M} -timezone :localtime
} {Oct 23,1992 15:00}
test clock-34.7 {clock scan tests} {
set time [clock scan "Oct 23,1992 15:00 GMT"]
@@ -34991,31 +34991,31 @@ test clock-34.11 {clock scan tests} {
test clock-34.12 {clock scan, relative times} {
set time [clock scan "Oct 23, 1992 -1 day"]
- clock format $time -format {%b %d, %Y}
+ clock format $time -format {%b %d, %Y} -timezone :localtime
} "Oct 22, 1992"
test clock-34.13 {clock scan, ISO 8601 base date format} {
set time [clock scan "19921023"]
- clock format $time -format {%b %d, %Y}
+ clock format $time -format {%b %d, %Y} -timezone :localtime
} "Oct 23, 1992"
test clock-34.14 {clock scan, ISO 8601 expanded date format} {
set time [clock scan "1992-10-23"]
- clock format $time -format {%b %d, %Y}
+ clock format $time -format {%b %d, %Y} -timezone :localtime
} "Oct 23, 1992"
test clock-34.15 {clock scan, DD-Mon-YYYY format} {
set time [clock scan "23-Oct-1992"]
- clock format $time -format {%b %d, %Y}
+ clock format $time -format {%b %d, %Y} -timezone :localtime
} "Oct 23, 1992"
test clock-34.16 {clock scan, ISO 8601 point in time format} {
set time [clock scan "19921023T235959"]
- clock format $time -format {%b %d, %Y %H:%M:%S}
+ clock format $time -format {%b %d, %Y %H:%M:%S} -timezone :localtime
} "Oct 23, 1992 23:59:59"
test clock-34.17 {clock scan, ISO 8601 point in time format} {
set time [clock scan "19921023 235959"]
- clock format $time -format {%b %d, %Y %H:%M:%S}
+ clock format $time -format {%b %d, %Y %H:%M:%S} -timezone :localtime
} "Oct 23, 1992 23:59:59"
test clock-34.18 {clock scan, ISO 8601 point in time format} {
set time [clock scan "19921023T000000"]
- clock format $time -format {%b %d, %Y %H:%M:%S}
+ clock format $time -format {%b %d, %Y %H:%M:%S} -timezone :localtime
} "Oct 23, 1992 00:00:00"
# CLOCK SCAN REAL TESTS