Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2004-05-15
04:46 • Closed ticket [922848ffff]: clock.test failures on LynxOS 3.1.0 plus 7 other... artifact: c31149f485 user: kennykb
2004-03-25
18:35 • Ticket [922848ffff]: 2 changes artifact: 3306be4ea5 user: dkf
07:44 • Ticket [922848ffff]: 4 changes artifact: ae1db63135 user: david_glessner
07:44 • Add attachment tcl8.4.6-local.patch-02 to ticket [922848ffffffffff|9228... artifact: 881729bf77 user: david_glessner
00:44 • New ticket [922848ffff] clock.test failures on LynxOS 3.1.0. artifact: 7324e4b759 user: david_glessner

clock.test failures on LynxOS 3.1.0

Closed / Fixed922848ffffffffffffffffffffffffffffffffffCreated 23 years agoUpdated 23 years ago
Descriptionplain2004-03-25 00:44:52
Some clock.test tests are failing on LynxOS 3.1.0 
071000-F PowerPC.

---- Result was:
CSTPST
---- Result should have been (exact matching):
GMTPST
==== clock-3.2 FAILED

---- Result was:
CSTCST
---- Result should have been (exact matching):
GMTGMT
==== clock-3.4 FAILED

These failures appear to be caused by LynxOS not 
performing as Tcl expects when the TZ environment 
variable is set to "GMT".  Thes failures go away when 
TZ is set to "GMT0" instead of "GMT" in 
generic/tclClock.c.

From reading the Single Unix Specification Version 3, 
"GMT0" is correct and "GMT" is not.  It says that, "The 
offset following std shall be required."


There were failures in clock-4.6, clock-4.16, 
clock-4.17, and clock-4.18 where the times were ahead 
by one hour.

These failures appear to be caused by using the 
tz.tz_dsttime as a boolean in unix/tclUnixTime.c.  This 
structure member indicates the algorithm to be used for 
the daylight saving time method.  The value of 1 
indicates USA, and this causes an additional 60 minutes 
to be added.

I've included a patch that appears to work for me.  It 
assumes the presence of the previous patch I submitted.

I wonder if the use of tz.tz_dsttime is correct for any 
platform?


FYI, clock-4.3 also fails, but it's due to a strftime 
bug in the LynxOS libc.a.

    clock format [clock scan "14 Feb 92" -gmt true]  
-format {%m/%d/%y %I:%M:%S %p} -gmt true

---- Result was:
02/14/92 00:00:00 AM
---- Result should have been (exact matching):
02/14/92 12:00:00 AM
==== clock-4.3 FAILED

I guess configuration could check for a buggy 
conversion and use a workaround (e.g. 
compat/strftime.c), but LynuxWorks has a corrected 
ctime.as.o that presumably works too.
david_glessnerplain2004-03-25 07:44:52
File Added - 81268: tcl8.4.6-local.patch-02
dkf Ticket [922848ffff]: 2 changes [History diff]2004-03-25 18:35:35
kennykbplain2004-05-15 04:46:56
Logged In: YES 
user_id=99768

Thanks for the bug report.  Put in changes that avoid using
the bogus gettimeofday() method to determine the time zone.
Also adopted the suggested 'GMT0' in place of GMT -
and fixed a related bug that caused tzset() not to be called
when env(TZ) changed.  I'd appreciate it if you could retest
either against the HEAD or against the tip of core-8-4-branch,
because I merged several other fixes into the commit, so
the code does NOT match your patch.
Log in (anonymous is fine) to add a comment.

Attachments: