[Scilab-users] problem with getdate()
Frederic Jourdin
frederic.jourdin at shom.fr
Tue Nov 13 11:59:20 CET 2012
Effectively this is strange:
the 7th value of getdate(0) is 1 and should be 0 instead!
(Checked on Scilab 5.4.0)
Fred
Le 13/11/2012 11:11, jacques.beilin a écrit :
> 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
>
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
More information about the users
mailing list