mirror of https://github.com/lcpz/lain.git
#198 fix attempt 3: patch on DST check
This commit is contained in:
parent
2d8e93f189
commit
7bc886679d
|
@ -43,7 +43,7 @@ local function worker(args)
|
||||||
local utc_offset = args.utc_offset or
|
local utc_offset = args.utc_offset or
|
||||||
function ()
|
function ()
|
||||||
local now = os.time()
|
local now = os.time()
|
||||||
return os.difftime(now, os.time(os.date("!*t", now))) + (os.date("*t").isdst and 3600)
|
return os.difftime(now, os.time(os.date("!*t", now))) + ((os.date("*t").isdst and 1 or 0) * 3600)
|
||||||
end
|
end
|
||||||
local units = args.units or "metric"
|
local units = args.units or "metric"
|
||||||
local lang = args.lang or "en"
|
local lang = args.lang or "en"
|
||||||
|
|
Loading…
Reference in New Issue