lua-users home
lua-l archive

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




Am 28.03.2017 um 13:43 schrieb Francisco Olarte:
On Tue, Mar 28, 2017 at 1:34 PM, Oliver Kroth <oliver.kroth@nec-i.de> wrote:
os.time() normally operates on local time. I usually apply a correction:
utc = os.time{ ...some table ...} - os.time{year=1970, month=1, day=1,
hour=0}
which subtracts the offset to local time.
Doesn't this have a problem with DST? In my system, TZ=Europe/Madrid:


Actually, no. At my Lua implementation

os.time{year=1970,month=1,day=1,hour=0,isdst=true}

returns -7200

which is correct for our time zone CETD.

--
Oliver