From bug-octave-request at bevo dot che dot wisc dot edu Sun May 24 22:46:05 1998 Subject: mktime error for mips-sgi-irix6.2 From: "Billinghurst, David" To: bug-octave at bevo dot che dot wisc dot edu Date: Mon, 25 May 1998 13:47:54 +1000 Version: octave-2.0.13 OS: mips-sgi-irix6.2 Compiler: egcs-1.0.2 with shared libraries Problem: make check fails intermittently on test mktime-1.m Test mktime-1.m fails on some runs. The test is t = time (); mktime (localtime (t)) == t On further investigation I found that mktime (localtime (t)) == t in the first half of each second mktime (localtime (t)) == t+1 in the second half of each second. The output from localtime seems OK Example: octave:9> localtime(0.75) ans = { usec = 750000 year = 70 mon = 0 mday = 1 sec = 1 zone = EST min = 0 wday = 4 hour = 10 isdst = 0 yday = 0 } octave:10> mktime(localtime(0.75)) ans = 1.7500 +++++++++++++++++++++++++++++++++++++++++ (Mr) David Billinghurst Comalco Research and Technical Support PO Box 316, Thomastown, Vic, Australia, 3074 Phone: +61 3 9469 0642 FAX: +61 3 9462 2700 Email: David dot Billinghurst at riotinto dot com dot au