[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: os.time() and timezones
- From: Rena <hyperhacker@...>
- Date: Fri, 13 Apr 2012 02:16:40 -0600
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?
--
Sent from my toaster.