Error in datestr.m in Octave-3.2.0 MingW

Philip Nienhuis pr.nienhuis at hccnet.nl
Mon Jun 22 12:32:51 CDT 2009


Hi,

Octave's function datestr.m fails for dates before Jan 2, 1970 in the
MingW build 3.2.0:

**********************<screen copy:>*********************************

GNU Octave, version 3.2.0
Copyright (C) 2009 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type `warranty'.

Octave was configured for "i686-pc-mingw32".

Additional information about Octave is available at http://www.octave.org.

Please contribute if you find this software useful.
For more information, visit http://www.octave.org/help-wanted.html

Report bugs to <bug at octave.org> (but first, please read
http://www.octave.org/bugs.html to learn how to write a helpful report).

For information about changes from previous versions, type `news'.

warning: mark_as_command is obsolete and will be removed from a future
version of Octave
octave-3.2.0 > datestr(datenum(1970, 1, 1))
ans = 00-Jan-1900
octave-3.2.0 > datestr(datenum(1970, 1, 2))
ans = 02-Jan-1970
octave-3.2.0 >

**********************</screen copy>*********************************

The previous 3.0.3 VC++ Windows build is OK in this respect.

I haven't checked other binary octave versions yet.

While perusing the source code of datestr.m I couldn't find the spot
where the actual conversion takes place (but then again I'm neither an 
octave nor a C++ guru).
(Speculation (sorry): I suspect the use of strftime() may be related to 
this.)

Thanks,

Philip


More information about the Bug-octave mailing list