lua-users home
lua-l archive

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


On 13/04/2012, at 8:16 PM, Rena wrote:

> It looks like in 5.1, os.date() can be told to give times in GMT, but
> os.time(), given a table, always returns the result in the local
> timezone. It also appears there's no easy way to check what the
> current timezone offset is. (The best I can see would be some magic
> involving os.date('%z') which then also has to be corrected for DST.
> 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?

Does this help? http://lua-users.org/lists/lua-l/2008-03/msg00051.html