|
Thanks for the clarification guys, yes thats the explanation, the discrepancy is the timezone difference of 3 hours (I am in the UK) I maintain that is a pretty horrid example for a newbie reading that os.date page, as there is no mention of time zone dependancy at that point. Not totally suprisingly it didnt occur to me you have to be typing away at a PC in Brazil for the numbers to work out correctly ! Thats another prize I havent won then :) Regards Geoff From: louie@transsys.com Date: Wed, 6 Apr 2011 17:09:18 -0400 To: lua-l@lists.lua.org Subject: Re: os.time() vs. isdst Time zone and daylight savings time difference for you? When I try the example, I get differences in the hour and isdst fields.
$ lua -e 't = os.date("*t", 906000490);print(t.hour,t.min,t.sec,t.isdst)'
22 48 10 true
However, I use use a different timezone, it seems to be correct:
$ TZ=Brazil/East lua -e 't = os.date("*t", 906000490);print(t.hour,t.min,t.sec,t.isdst)'
23 48 10 false On Apr 6, 2011, at 3:57 PM, Jeff Smith wrote: |