# HG changeset patch # User Kim Alvefur # Date 1544393162 -3600 # Node ID 588ec80f1677b7a09a32e4cfa25aa24f4838962e # Parent 2db341f7c5fc88403211e87f8674a70c35ec2647# Parent e616c37756b34b85104c20e45af18dc8ffcdf590 Merge 0.11->trunk diff -r 2db341f7c5fc -r 588ec80f1677 util/datetime.lua --- a/util/datetime.lua Sun Dec 09 20:53:33 2018 +0100 +++ b/util/datetime.lua Sun Dec 09 23:06:02 2018 +0100 @@ -38,7 +38,8 @@ local year, month, day, hour, min, sec, tzd; year, month, day, hour, min, sec, tzd = s:match("^(%d%d%d%d)%-?(%d%d)%-?(%d%d)T(%d%d):(%d%d):(%d%d)%.?%d*([Z+%-]?.*)$"); if year then - local time_offset = os_difftime(os_time(os_date("*t")), os_time(os_date("!*t"))); -- to deal with local timezone + local now = os_time(); + local time_offset = os_difftime(os_time(os_date("*t", now)), os_time(os_date("!*t", now))); -- to deal with local timezone local tzd_offset = 0; if tzd ~= "" and tzd ~= "Z" then local sign, h, m = tzd:match("([+%-])(%d%d):?(%d*)");