octave-maintainers
[Top][All Lists]
Advanced

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

Re: datestr (datenum (1969, 1, 1), 0) does not work on octave-3.3.51+ on


From: Tatsuro MATSUOKA
Subject: Re: datestr (datenum (1969, 1, 1), 0) does not work on octave-3.3.51+ on MinGW
Date: Wed, 17 Nov 2010 16:20:40 +0900 (JST)

Hello

Thank you for your help.

I have tried your datestr.m 


octave:1> datestr(datenum (1969, 1, 1),0)
warning: 
d:\usr\Tatsu\mingwhome\octaves\OctBuild\hg-devel\..\..\hg\octave-work\scripts\time\datestr.m:
possible Matlab-style short-circuit operator at line 293, column 19
 and stopped.

However ,the above gave me a hint where the octave is stopped.

    local = localtime(mktime(tm));
In detail, mktime(tm) makes octave in stopped state.

I consult, help of mktime

`mktime' is a function from the file
d:\usr\Tatsu\mingwhome\octaves\OctBuild\hg-devel\src\DLD-FUNCTIONS\time.oct

 -- Loadable Function:  mktime (TM_STRUCT)
     Convert a time structure corresponding to the local time to the
     number of seconds since the epoch.  For example:

          mktime (localtime (time ()))
              => 856163706

     See also: strftime, strptime, localtime, gmtime, time, now, date,
     clock, datenum, datestr, datevec, calendar, weekday

******************
Then I checked struct of 
localtime (time ())

octave:1> localtime (time ())
ans =
{
  usec =  890625
  sec =  44
  min =  2
  hour =  16
  mday =  17
  mon =  10
  year =  110
  wday =  3
  yday =  320
  isdst = 0
  zone = JST
}

I have investigated the structure of tm by changeing
 
From
local = localtime(mktime(tm))
to
tm #    local = localtime(mktime(tm))


The tm had the following structure.
tm =
{
  year =  69
  mon = 0
  mday =  1
  hour = 0
  min = 0
  sec = 0
  usec = 0
  isdst = -1
}

I do not have enough knowledge about the time related functions.
The orirun of octave freeze lie in mktime(tm) in my case.

Regards

Tatsuro
--- Liam Groener wrote:

> 
> On Nov 16, 2010, at 7:48 PM, Tatsuro MATSUOKA wrote:
> 
> > Hello
> > 
> > I have been suffered from fntests of time.cc never finished.
> > (On the octave -3.353+ built myself.)
> > 
> >  d:\usr\Tatsu\mingwhome\octaves\hg\octave-work\src/DLD-FUNCTIONS\syl.cc  
> > PASS    5/5
> >  d:\usr\Tatsu\mingwhome\octaves\hg\octave-work\src/DLD-FUNCTIONS\time.cc 
> > <--- stopped in this
> > situation
> > 
> > I have not remember when this error appeared but at least it was not in 
> > this month.
> > 
> > Pressing CTRL+C, I can comeback the shell prompt.
> > 
> > Therefore I read the test code of and examine them one by one.
> > 
> > I found that datestr seems not to work. (No response from octave.)
> > 
> > octave:1> datenum (1969, 1, 1)
> > ans =  719164
> > octave:2> datestr(datenum (1969, 1, 1),0) <--- stopped in this situation.
> > 
> > Is the above better to register the above issue to bug tracker?
> > 
> > Regards
> > 
> > Tatsuro
> > 
> > --------------------------------------
> > Get the new Internet Explorer 8 optimized for Yahoo! JAPAN
> > http://pr.mail.yahoo.co.jp/ie8/
> 
> Hi Tatsuro,
> 
> Can you try the attached datestr?
> Liam G
> 


--------------------------------------
Get the new Internet Explorer 8 optimized for Yahoo! JAPAN
http://pr.mail.yahoo.co.jp/ie8/


reply via email to

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