Tcl Source Code

View Ticket
Login
Ticket UUID: 34538ba43f82792b0cde9972f35dd443937c28c8
Title: tests/clock.test fails with boundary year 2099
Type: Bug Version: 8.6
Submitter: anonymous Created on: 2013-06-20 08:11:20
Subsystem: 06. Time Measurement Assigned To: kbk
Priority: 5 Medium Severity: Important
Status: Closed Last Modified: 2013-09-25 14:53:44
Resolution: Fixed Closed By: jan.nijtmans
    Closed on: 2013-09-25 14:53:44
Description:
Run tcl unit test, clock.test fails with boundary year 2099

tcl test 1 passes: Testing: append
tcl test 2 passes: Testing: appendComp
tcl test 3 passes: Testing: apply
tcl test 4 passes: Testing: assocd
unable to realloc 33554432 bytes
./REGRESSION-TESTS/tcl-TEST-01.sh: line 31: 29459 Aborted                 ./tcltest $i > ${TEST}.log
*** tcl test 5 fails: Testing: async ***
tcl test 6 passes: Testing: autoMkindex
tcl test 7 passes: Testing: basic
tcl test 8 passes: Testing: binary
tcl test 9 passes: Testing: case
tcl test 10 passes: Testing: chan
tcl test 11 passes: Testing: chanio
time value too large/small to represent
    while executing
"ConvertLocalToUTC $date[set date {}] $TZData($timezone) 2361222"
    (procedure "FreeScan" line 84)
    invoked from within
"FreeScan $string $base $timezone $locale"
    (procedure "::tcl::clock::scan" line 70)
    invoked from within
"clock scan "19991101 00:00:00""
    invoked from within
"test clock-34.26 {clock scan, DST for days} {
    clock scan "tomorrow" -base [clock scan "19991031 00:00:00"]
} [clock scan "19991101 00:00:00"]"
    (file "clock.test" line 35692)
*** tcl test 12 fails: Testing: clock ***


==== clock-5.799 time zone boundary case 2099-03-08 03:00:00 FAILED
==== Contents of test case:

    clock format 4076636400 -format {%H:%M:%S %z %Z}  -timezone :America/Detroit

---- Result was:
02:00:00 -0500 EST
---- Result should have been (exact matching):
03:00:00 -0400 EDT
==== clock-5.799 FAILED



==== clock-5.800 time zone boundary case 2099-03-08 03:00:01 FAILED
==== Contents of test case:

    clock format 4076636401 -format {%H:%M:%S %z %Z}  -timezone :America/Detroit

---- Result was:
02:00:01 -0500 EST
---- Result should have been (exact matching):
03:00:01 -0400 EDT
==== clock-5.800 FAILED



==== clock-5.801 time zone boundary case 2099-11-01 01:59:59 FAILED
==== Contents of test case:

    clock format 4097195999 -format {%H:%M:%S %z %Z}  -timezone :America/Detroit

---- Result was:
00:59:59 -0500 EST
---- Result should have been (exact matching):
01:59:59 -0400 EDT
==== clock-5.801 FAILED



==== clock-34.6 clock scan tests FAILED
==== Contents of test case:

    set time [clock scan "Oct 23,1992 15:00"]
    clock format $time -format {%b %d,%Y %H:%M}

---- Test generated error; Return code was: 1
---- Return code should have been one of: 0 2
---- errorInfo: time value too large/small to represent
    while executing
"ConvertLocalToUTC $date[set date {}] $TZData($timezone) 2361222"
    (procedure "FreeScan" line 84)
    invoked from within
"FreeScan $string $base $timezone $locale"
    (procedure "::tcl::clock::scan" line 70)
    invoked from within
"clock scan "Oct 23,1992 15:00""
    ("uplevel" body line 2)
    invoked from within
"uplevel 1 $script"
---- errorCode: NONE
==== clock-34.6 FAILED



==== clock-34.12 clock scan, relative times FAILED
==== Contents of test case:

    set time [clock scan "Oct 23, 1992 -1 day"]
    clock format $time -format {%b %d, %Y}

---- Test generated error; Return code was: 1
---- Return code should have been one of: 0 2
---- errorInfo: time value too large/small to represent
    while executing
"ConvertLocalToUTC $date[set date {}] $TZData($timezone) 2361222"
    (procedure "FreeScan" line 84)
    invoked from within
"FreeScan $string $base $timezone $locale"
    (procedure "::tcl::clock::scan" line 70)
    invoked from within
"clock scan "Oct 23, 1992 -1 day""
    ("uplevel" body line 2)
    invoked from within
"uplevel 1 $script"
---- errorCode: NONE
==== clock-34.12 FAILED



==== clock-34.13 clock scan, ISO 8601 base date format FAILED
==== Contents of test case:

    set time [clock scan "19921023"]
    clock format $time -format {%b %d, %Y}

---- Test generated error; Return code was: 1
---- Return code should have been one of: 0 2
---- errorInfo: time value too large/small to represent
    while executing
"ConvertLocalToUTC $date[set date {}] $TZData($timezone) 2361222"
    (procedure "FreeScan" line 84)
    invoked from within
"FreeScan $string $base $timezone $locale"
    (procedure "::tcl::clock::scan" line 70)
    invoked from within
"clock scan "19921023""
    ("uplevel" body line 2)
    invoked from within
"uplevel 1 $script"
---- errorCode: NONE
==== clock-34.13 FAILED



==== clock-34.14 clock scan, ISO 8601 expanded date format FAILED
==== Contents of test case:

    set time [clock scan "1992-10-23"]
    clock format $time -format {%b %d, %Y}

---- Test generated error; Return code was: 1
---- Return code should have been one of: 0 2
---- errorInfo: time value too large/small to represent
    while executing
"ConvertLocalToUTC $date[set date {}] $TZData($timezone) 2361222"
    (procedure "FreeScan" line 84)
    invoked from within
"FreeScan $string $base $timezone $locale"
    (procedure "::tcl::clock::scan" line 70)
    invoked from within
"clock scan "1992-10-23""
    ("uplevel" body line 2)
    invoked from within
"uplevel 1 $script"
---- errorCode: NONE
==== clock-34.14 FAILED
User Comments: jan.nijtmans added on 2013-06-27 12:41:23:

Even though I cannot reproduce any problem, suggested patch is trivial and makes sense, as on my Windows 7 machine it is possible to set the clock up to and including 2099. Fixed in core-8-5-branch [01ae5c884c] and trunk [535c915c79].

Tried to set the clock to 2099, but even then I don't see any test failures.

Kevin, any ideas? If not I'm OK closing this. Who would actually care about 2099.....


dgp added on 2013-06-20 11:58:18:
Passing this along to the [clock] maintainer,
but the testing output reported doesn't look
like Tcl's.  Is this really a bug against the
sources developed here?  Or should this be filed
against some other port/variant of Tcl?

Attachments: