lua-users home
lua-l archive

Re: os.time() and timezones

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


On Fri, Apr 13, 2012 at 10:16 AM, Rena <hyperhacker@gmail.com> wrote:
> Ouch.) Does Lua provide a way to turn a table into a Unix timestamp
> under the assumption that the table specifies GMT, not the local
> timezone?
I use this kind of logic to find the timezone offset in pl.Date:
 local t = os.time()
 local ut = os.date('!*t',t)
 local lt = os.date('*t',t)
 thour = lt.hour - ut.hour
 tmin = lt.min - ut.min
If this is misguided I would certainly like to know!
steve d.

AltStyle によって変換されたページ (->オリジナル) /