]> git.madduck.net Git - etc/awesome.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

modified: widgets/weather.lua - fixed +- 1 day difference due
authorTrap000d <trap000d@gmail.com>
Sat, 28 May 2016 23:15:07 +0000 (11:15 +1200)
committerTrap000d <trap000d@gmail.com>
Sat, 28 May 2016 23:15:07 +0000 (11:15 +1200)
to UTC time

widgets/weather.lua

index cd8f6abbc8cde1c69302d074418dcef45b6fa003..df3404003b7134b5dde5bedc11ccae1f0cb8d53f 100644 (file)
@@ -128,11 +128,13 @@ local function worker(args)
                 current_dt = os.time()
                 sunrise = weather_now["sys"]["sunrise"]
                 sunset  = weather_now["sys"]["sunset"]
                 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
                 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
                 icon = weather_now["weather"][1]["icon"]
                 weather.icon_path = icons_path .. icon:sub(1,2) .. datetime .. ".png"
                 widget = weather.widget