DATESTR function seems to bee pretty buggy :

* On Octave 3.2.4 Windows MinGW (from 3.2.0 ?), when the argument correspond
to a date before 1st January 1970 at 1:00. Example :

>> datestr(now)
ans = 17-Sep-2010 16:12:57
% it's OK

>> datestr(datenum(1970,1,1,1,0,01))
ans = 01-Jan-1970 01:00:01
% still OK

>> datestr(datenum(1970,1,1,0,59,30))
ans = 00-Jan-1900 00:00:00
% bad, shoud be 01-Jan-1970 00:59:30

>> datestr(1,'dd-mmm-yyyy HH:MM:SS')
ans = 00-Jan-1900 00:00:00
% bad, shoud be 01-Jan-0000 00:00:00

>> datestr(1.0001,'dd-mmm-yyyy HH:MM:SS')
ans = 01-Jan-1970 01:00:00
% bad, shoud be 01-Jan-0000 00:00:08
% and why suddenly back in year 1970 and not 1900 like previous command ???


* On Linux Ubuntu 10.04, Octave 3.2.3 is buggy when the argument is earlier
than 13 December 1901 at 21:45:52, string allways returned is :  01-Jan-1970
00:59:59


---
JDB






-- 
View this message in context: 
http://old.nabble.com/Function-DATESTR-is-buggy-tp29739289p29739289.html
Sent from the octave-dev mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to