From e3a5dd623700b2cad423c8179141124e6e9b9027 Mon Sep 17 00:00:00 2001 From: Trap000d Date: Sun, 29 May 2016 11:15:07 +1200 Subject: [PATCH] modified: widgets/weather.lua - fixed +- 1 day difference due to UTC time --- widgets/weather.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/widgets/weather.lua b/widgets/weather.lua index cd8f6ab..df34040 100644 --- a/widgets/weather.lua +++ b/widgets/weather.lua @@ -128,11 +128,13 @@ local function worker(args) current_dt = os.time() sunrise = weather_now["sys"]["sunrise"] sunset = weather_now["sys"]["sunset"] + if current_dt> sunrise and current_dt> sunset then current_dt = current_dt - 86400 end if current_dt > sunrise and current_dt < sunset then datetime="d" else datetime="n" end + -- error("dt sr:" .. sunrise .. "ss: " .. sunset .. "dt: " .. current_dt .. "d/n: " .. datetime .. "hehe") icon = weather_now["weather"][1]["icon"] weather.icon_path = icons_path .. icon:sub(1,2) .. datetime .. ".png" widget = weather.widget