Artifacts Associated With Ticket 1113146fffffffff
Ticket change [0453047599] (rid 119980) by georgeps on 2005-01-31 13:02:33:
- assignee initialized to: "kennykb"
- cmimetype initialized to: "text/plain"
- comment initialized to:
With NetBSD 2.0 x86: ==== 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 "return -options $opts $result" (procedure "ConvertLocalToUTC" line 14) invoked from within "ConvertLocalToUTC $date[set date {}]" (procedure "FreeScan" line 75) invoked from within "FreeScan $string $base $timezone $locale" (procedure "::tcl::clock::scan" line 69) invoked from within "clock scan "Oct 23,1992 15:00"" invoked from within "set time [clock scan "Oct 23,1992 15:00"]" ("uplevel" body line 2) invoked from within "uplevel 1 $script" ---- errorCode: NONE ==== clock-34.6 FAILED - foundin initialized to: "obsolete: 8.5a3"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "georgeps"
- subsystem initialized to: "06. Time Measurement"
- title initialized to: "clock-34.6 clock scan failure in NetBSD"
- type initialized to: "Bug"
Ticket change [f37d918202] (rid 129729) by georgeps on 2005-02-01 07:04:45:
- status changed to: "Closed"
Ticket change [12571b8a6b] (rid 95291) by georgeps on 2005-02-01 07:04:46:
- closedate changed to: "2005-02-01T00:04:46"
- closer changed to: "georgeps"
- icomment:
Logged In: YES user_id=585068 With the help of KBK we discovered that it's really the problem that I don't have an /etc/localtime symlink on my system. The NetBSD installer creates this symlink, and the manual page for afterboot mentions it at the top. I removed the symlink, because the clock is skewed in NetBSD (from the BIOS and Windows). The fix in my case is: # ln -s /usr/share/zoneinfo/US/Mountain /etc/localtime There is an RTC_OFFSET kernel option for NetBSD that should in theory fix this problem, and allow me to have the same time for all operating systems, and the BIOS. I wrote this test program to verify: #include <stdio.h> #include <stdlib.h> #include <string.h> #include <errno.h> #include <time.h> int main () { struct tm t; t.tm_sec = 0; t.tm_min = 0; t.tm_hour = 14; t.tm_mday = 22; t.tm_mon = 9; t.tm_year = 2; t.tm_wday = 6; t.tm_yday = 297; if (-1 == mktime (&t)) { printf ("errno %d\n", errno); perror ("mktime"); return EXIT_FAILURE; } return EXIT_SUCCESS; } Without /etc/localtime: $ cc mktime_test.c && ./a.out errno 2 mktime: No such file or directory - login: "georgeps"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- username: "georgeps"