Skip to content
Tcl Source Code History Of Ticket 1113146
Login

History Of Ticket 1113146

Artifacts Associated With Ticket 1113146

  1. Ticket change [0453047599] (rid 119980) by georgeps on 2005-01-31 13:02:33:

    1. assignee initialized to: "kennykb"
    2. cmimetype initialized to: "text/plain"
    3. 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
      
      
    4. foundin initialized to: "obsolete: 8.5a3"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "georgeps"
    9. subsystem initialized to: "06. Time Measurement"
    10. title initialized to: "clock-34.6 clock scan failure in NetBSD"
    11. type initialized to: "Bug"
  2. Ticket change [f37d918202] (rid 129729) by georgeps on 2005-02-01 07:04:45:

    1. status changed to: "Closed"
  3. Ticket change [12571b8a6b] (rid 95291) by georgeps on 2005-02-01 07:04:46:

    1. closedate changed to: "2005-02-01T00:04:46"
    2. closer changed to: "georgeps"
    3. 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
      
      
      
    4. login: "georgeps"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. username: "georgeps"