clock-32.1 fails
Closed / Fixed1371446fffffffffffffffffffffffffffffffffCreated 21 years agoUpdated 21 years ago
Descriptionplain2005-12-02 04:24:57
==== clock-32.1 scan/format across the Gregorian change
FAILED
==== Contents of test case:
set problems {}
set t [expr { wide(-6857395200) }]
foreach d { 1 2 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30 } j { 245
246 258 259 260
261 262 263 264 265 266 267
268 269 270 271 272 273 274 } {
set u [format 1752-09-%02d $d]
set s [clock format $t -format %Y-%m-%d
-locale en_US_roman -timezone :UTC]
if { $s ne $u } {
append problems "formatting $t: $s should
be $u\n"
}
set v [clock scan $u -format %Y-%m-%d -locale
en_US_roman -timezone :UTC]
if { $t ne $v } {
append problems "scanning $u: $t should be
$v\n"
}
set u [format 1752-%03d $j]
set s [clock format $t -format %Y-%j -locale
en_US_roman -timezone :UTC]
if { $s ne $u } {
append problems "formatting $t: $s should
be $u\n"
}
set v [clock scan $u -format %Y-%j -locale
en_US_roman -timezone :UTC]
if { $t ne $v } {
append problems "scanning $u: $t should be
$v\n"
}
incr t 86400
}
set problems
---- Result was:
formatting -6857395200: 1752-09-12 should be 1752-09-01
formatting -6857395200: 1752-256 should be 1752-245
formatting -6857308800: 1752-09-13 should be 1752-09-02
formatting -6857308800: 1752-257 should be 1752-246
---- Result should have been (exact matching):
==== clock-32.1 FAILED
I see this failure on
both Solaris 9 and Mac OSX.
kennykb Closed ticket [1371446fff].
[History diff]2005-12-03 00:00:21
Log in (anonymous is fine) to add a comment.