lua-users home
lua-l archive

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


Hi
 
While we are on the subject of os.date os.time etc. Can someone volunteer to check this for me please ?
 
PiL chapter 22 states
 
temp = os.date("*t", 906000490)
produces the table

    {year = 1998, month = 9, day = 16, yday = 259, wday = 4,
     hour = 23, min = 48, sec = 10, isdst = false}
 
 
Is 906000490 the correct number here ? I cant get it to give me the table numbers stated below it ?
 
It could be me misunderstanding something, or is it a mistake ?
 
Regards Geoff
 
PS Do I win a prize for spotting a 13 year old mistake ? :)
 
 
 
> Date: Wed, 6 Apr 2011 12:31:16 -0300
> From: roberto@inf.puc-rio.br
> To: lua-l@lists.lua.org
> Subject: Re: os.time() vs. isdst
>
> > On Wed, Apr 6, 2011 at 17:39, Roberto Ierusalimschy
> > <roberto@inf.puc-rio.br> wrote:
> > >> But maybe you can clarify os.date() definition in manual? It is not
> > >> obvious that this feature is supported. (Not sure about the wording
> > >> though.)
> >
> > >  ...
> > >  and 'isdst' (daylight saving flag, a boolean).
> > > +This last field may be absent if the system
> > > +does not have this information.
> >
> > Not sure about the mention of "system" — in os.time() it is user who
> > does not have the information.
>
> We may just copy six words from the ISO standard:
>
> +This last field may be absent
> +if the information is not available.
>
> -- Roberto
>