Ticket UUID: | 922848 | |||
Title: | clock.test failures on LynxOS 3.1.0 | |||
Type: | Bug | Version: | None | |
Submitter: | david_glessner | Created on: | 2004-03-25 00:44:52 | |
Subsystem: | 06. Time Measurement | Assigned To: | kennykb | |
Priority: | 5 Medium | Severity: | ||
Status: | Closed | Last Modified: | 2004-05-15 04:46:56 | |
Resolution: | Fixed | Closed By: | kennykb | |
Closed on: | 2004-05-14 21:46:56 | |||
Description: |
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. | |||
User Comments: |
kennykb added on 2004-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. david_glessner added on 2004-03-25 07:44:52: File Added - 81268: tcl8.4.6-local.patch-02 |
Attachments:
- tcl8.4.6-local.patch-02 [download] added by david_glessner on 2004-03-25 07:44:52. [details]