diff options
author | Kevin B Kenny <kennykb@acm.org> | 2004-09-08 15:38:28 (GMT) |
---|---|---|
committer | Kevin B Kenny <kennykb@acm.org> | 2004-09-08 15:38:28 (GMT) |
commit | 30204f6dca832947b87b204f4fb74bccbd0be640 (patch) | |
tree | 46ac560d77a5ba621f11e75736f2c19ba8a94fac /tests | |
parent | 81f39c521013b8e14be326102c01400789e50150 (diff) | |
download | tcl-30204f6dca832947b87b204f4fb74bccbd0be640.zip tcl-30204f6dca832947b87b204f4fb74bccbd0be640.tar.gz tcl-30204f6dca832947b87b204f4fb74bccbd0be640.tar.bz2 |
* 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.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/clock.test | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/tests/clock.test b/tests/clock.test index 0fa42b6..15647d9 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.40 2004/09/07 17:38:59 kennykb Exp $ +# RCS: @(#) $Id: clock.test,v 1.41 2004/09/08 15:38:35 kennykb Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -35236,6 +35236,27 @@ test clock-39.1 {regression - synonym timezones} { clock format 0 -format {%H:%M:%S} -timezone :US/Eastern } {19:00:00} +test clock-40.1 {regression - bad month with -timezone :localtime} \ + -setup { + if { [info exists env(TZ)] } { + set oldTZ $env(TZ) + } + set env(TZ) UTC0 + } \ + -body { + clock scan 1970-01-01T00:00:00 -timezone :localtime \ + -format %Y-%m-%dT%H:%M:%S + } \ + -cleanup { + if { [info exists oldTZ] } { + set env(TZ) $oldTZ + unset oldTZ + } else { + unset env(TZ) + } + } \ + -result {0} + # cleanup namespace delete ::testClock |