help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: date weirdness (Freebsd, octave 3.2.4)


From: Ben Abbott
Subject: Re: date weirdness (Freebsd, octave 3.2.4)
Date: Fri, 26 Mar 2010 09:53:51 -0400

On Mar 26, 2010, at 4:11 AM, Jaroslav Hajek wrote:

> On Fri, Mar 26, 2010 at 8:55 AM, Michael Goffioul
> <address@hidden> wrote:
>> On Fri, Mar 26, 2010 at 12:12 AM, Liam Groener <address@hidden> wrote:
>>> Actually the problem is in the gnulib version of mktime that is used by 
>>> Octave's datestr. The gnulib mktime only works for dates latter than 1902. 
>>> I proposed a hack of datestr.m to get around this problem to the 
>>> maintainers list, but got no response. I've attached a copy of the revised 
>>> datestr.m in case you want to use it. By the way, datevec has the same 
>>> problem.
>> 
>> I'm puzzled by your comment. Octave-3.2.4 (version mentionned in
>> the original bug report) does not use gnulib. And the develoment
>> version of octave I compiled about 1 week ago is not using the
>> gnulib version of mktime...
>> 
>> Michael.
>> 
> 
> You're right, it doesn't. Maybe that will be enough to avoid the
> trouble. Btw., the original example seems to work for me.
> 


Recent build on MacOS X ...

octave:1> datestr(now()- 30000)
ans = 05-Feb-1928 09:44:46
octave:2> datestr(now()- 100000)
ans = 31-Dec-1969 19:00:00

and with Liam's patch ...

        
http://www-old.cae.wisc.edu/pipermail/octave-maintainers/2010-March/015365.html

octave:9> datestr(now()- 100000)
ans = 10-Jun-1736 09:46:20

Ben





reply via email to

[Prev in Thread] Current Thread [Next in Thread]