From: copycat-killer Date: Mon, 30 May 2016 19:01:44 +0000 (+0200) Subject: #198: correct logic X-Git-Url: https://git.madduck.net/etc/awesome.git/commitdiff_plain/0802b5a70487c5db66b339a57e75a5b2236beeb7?ds=sidebyside;hp=--cc #198: correct logic --- 0802b5a70487c5db66b339a57e75a5b2236beeb7 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