[Scilab-users] problem with getdate()
jacques.beilin
jacques.beilin at ensg.eu
Tue Nov 13 11:11:31 CET 2012
Dear All,
I am currently trying to learn Scilab. I Wrote a Gnu Octave GPS
date/time management package and I am trying to port it to Scilab. Il
notice a strange behaviour of a scilab function.
I use the getdate() function in order to get date/time elements from
current date or from an epoch refered to unix timestamp (1970-01-01
0h00UTC).
Without any parameter getdate gives a date including the time zone.
When called with a parameter (i.e. getdate(0)), the function gives 1970
January, 1st at 1:00 instead of 0:00. the "0" parameter stands for the
number of seconds from 1970-01-01T00:00:00.
-->getdate(0)
ans =
1970. 1. 1. 1. 5. 1. 1. 0. 0. 0.
I do not find the reason why the date needs to be corrected from time
zone when getdate is called with a parameter.
On a computed set to UTC+00, getdate(0) gives the right result.
I compared with Gnu Octave. The equivalent function is gmtime. gmtile(0)
gives the rigth result.
Regards,
Jacques Beilin
More information about the users
mailing list