Skip to content
Tcl Source Code View Ticket
Login

View Ticket

Failed clock tests - fixed in 8.5, will not backport

Closed / Postponed1181643fffffffffffffffffffffffffffffffffCreated 22 years agoUpdated 22 years ago
Descriptionplain2005-04-12 17:17:14
AIX 5.2 - Maintenance Level 5

The following tests failed:
clock.test

==== clock-10.8 ISO week-based calendar 2002-W01-1 
FAILED
==== Contents of test case:

    clock format 1009756800 -format {%a %A %g %G %
u %V %w} -gmt true; # 2001-12-
31

---- Result was:
Mon Monday 00 2000 1 53 1
---- Result should have been (exact matching):
Mon Monday 02 2002 1 01 1
==== clock-10.8 FAILED


==== clock-10.14 ISO week-based calendar 2003-W01-
1 FAILED
==== Contents of test case:

    clock format 1041206400 -format {%a %A %g %G %
u %V %w} -gmt true; # 2002-12-
30

---- Result was:
Mon Monday 01 2001 1 53 1
---- Result should have been (exact matching):
Mon Monday 03 2003 1 01 1
==== clock-10.14 FAILED


==== clock-10.15 ISO week-based calendar 2003-W01-
2 FAILED
==== Contents of test case:

    clock format 1041292800 -format {%a %A %g %G %
u %V %w} -gmt true; # 2002-12-
31

---- Result was:
Tue Tuesday 01 2001 2 53 2
---- Result should have been (exact matching):
Tue Tuesday 03 2003 2 01 2
==== clock-10.15 FAILED


==== clock-10.21 ISO week-based calendar 2004-W01-
1 FAILED
==== Contents of test case:

    clock format 1072656000 -format {%a %A %g %G %
u %V %w} -gmt true; # 2003-12-
29

---- Result was:
Mon Monday 02 2002 1 53 1
---- Result should have been (exact matching):
Mon Monday 04 2004 1 01 1
==== clock-10.21 FAILED


==== clock-10.22 ISO week-based calendar 2004-W01-
3 FAILED
==== Contents of test case:

    clock format 1072828800 -format {%a %A %g %G %
u %V %w} -gmt true; # 2003-12-
31

---- Result was:
Wed Wednesday 02 2002 3 53 3
---- Result should have been (exact matching):
Wed Wednesday 04 2004 3 01 3
==== clock-10.22 FAILED


==== clock-10.28 ISO week-based calendar 2004-W53-
1 FAILED
==== Contents of test case:

    clock format 1104105600 -format {%a %A %g %G %
u %V %w} -gmt true; # 2004-12-
27

---- Result was:
Mon Monday 03 2003 1 53 1
---- Result should have been (exact matching):
Mon Monday 04 2004 1 53 1
==== clock-10.28 FAILED


==== clock-10.29 ISO week-based calendar 2004-W53-
5 FAILED
==== Contents of test case:

    clock format 1104451200 -format {%a %A %g %G %
u %V %w} -gmt true; # 2004-12-
31

---- Result was:
Fri Friday 03 2003 5 53 5
---- Result should have been (exact matching):
Fri Friday 04 2004 5 53 5
==== clock-10.29 FAILED


==== clock-10.43 ISO week-based calendar 2009-W53-
1 FAILED
==== Contents of test case:

    clock format 1261958400 -format {%a %A %g %G %
u %V %w} -gmt true; # 2009-12-
28

---- Result was:
Mon Monday 08 2008 1 53 1
---- Result should have been (exact matching):
Mon Monday 09 2009 1 53 1
==== clock-10.43 FAILED


==== clock-10.44 ISO week-based calendar 2009-W53-
4 FAILED
==== Contents of test case:

    clock format 1262217600 -format {%a %A %g %G %
u %V %w} -gmt true; # 2009-12-
31

---- Result was:
Thu Thursday 08 2008 4 53 4
---- Result should have been (exact matching):
Thu Thursday 09 2009 4 53 4
==== clock-10.44 FAILED


==== clock-41.1 regression test - format group %k 
when hour is 0 FAILED
==== Contents of test case:

    clock format 0 -format %k -gmt true

---- Result was:
%k
---- Result should have been (exact matching):
 0
==== clock-41.1 FAILED
kennykb Closed ticket [1181643fff]. [History diff]2005-04-13 01:10:34
kennykbplain2005-04-13 01:10:35
Logged In: YES 
user_id=99768

AIX's native strftime() routine appears to be returning
disastrously bad results for the %G, %g, and %V 
format groups (the ISO8601 week-based calendar),
for instance, reporting that 12-31-2009 is in week 53
of year 2008.  This is a bug in the underlying C runtime
library that Tcl inherits.

The bug will not affect any code that doesn't do
calculations with ISO-style fiscal weeks.  It's also fixed
in 8.5, where Tcl avoids using strftime() entirely
(because it's buggy on too many platforms.  At least
in 8.5, the bugs in [clock format] are our *own bugs.)
Log in (anonymous is fine) to add a comment.