From bug-octave-request at bevo dot che dot wisc dot edu Tue Jan 4 10:34:03 2000 Subject: Still problems with time func since y2k (win95/gnuwin32) From: Rolf Fabian To: "'bug-octave UWISC'" Date: Tue, 4 Jan 2000 10:34:42 -0600 (CST) Hi, yesterday, I've already reported problems with clock.m (returning year 1970 instead of 2000) on my win95/gnuwin32 installation since Jan. 1st 2000. I've got a reply from jwe, that it's highly unlikely to be an octave-bug because clock() simply calls ,localtime( time() )'. Now I'm convinced, that the problem comes from ,time()' call, which should return the number of seconds since 1970 (UNIX epoch). The number returned by ,time()' is incorrect and by far too small !! Please have a look at the following log :> version ans=2.0.13 #win95/gnuwin32-b20 :> system('date'); LT=localtime(TIME=time()), TIME, CLOCK=clock() Tue Jan 4 16:35:43 2000 LT = { usec = 8.0900e+05 year = 70 mon = 0 mday = 25 sec = 22 min = 22 wday = 0 hour = 10 isdst = 0 yday = 24 } TIME = 2.1073e+06 CLOCK = 1970.0000 1.0000 25.0000 10.0000 22.0000 22.8090 Because as a ,rule of thumb' an (average) year has about pi*1e7 seconds , the output of TIME=time() octave built-in func. is obviously much too small and seems to be responsible for the problems observed. ----------------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.che.wisc.edu/octave/octave.html How to fund new projects: http://www.che.wisc.edu/octave/funding.html Subscription information: http://www.che.wisc.edu/octave/archive.html -----------------------------------------------------------------------