From 0802b5a70487c5db66b339a57e75a5b2236beeb7 Mon Sep 17 00:00:00 2001 From: copycat-killer Date: Mon, 30 May 2016 21:01:44 +0200 Subject: [PATCH] #198: correct logic --- widgets/pulsebar.lua | 10 +++++----- widgets/weather.lua | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/widgets/pulsebar.lua b/widgets/pulsebar.lua index 6955b04..5004be6 100644 --- a/widgets/pulsebar.lua +++ b/widgets/pulsebar.lua @@ -1,10 +1,10 @@ --[[ - - Licensed under GNU General Public License v2 - * (c) 2013, Luke Bonham - * (c) 2013, Rman - + + Licensed under GNU General Public License v2 + * (c) 2013, Luke Bonham + * (c) 2013, Rman + --]] local newtimer = require("lain.helpers").newtimer diff --git a/widgets/weather.lua b/widgets/weather.lua index 7ff498a..75c2342 100644 --- a/widgets/weather.lua +++ b/widgets/weather.lua @@ -126,9 +126,9 @@ local function worker(args) if not err and weather_now and tonumber(weather_now["cod"]) == 200 then -- weather icon based on localtime - now = os.time() - (utc * 3600) - sunrise = tonumber(weather_now["sys"]["sunrise"]) - sunset = tonumber(weather_now["sys"]["sunset"]) + now = os.time() + sunrise = tonumber(weather_now["sys"]["sunrise"]) + (utc * 3600) + sunset = tonumber(weather_now["sys"]["sunset"]) + (utc * 3600) icon = weather_now["weather"][1]["icon"] if sunrise <= now and now <= sunset then