]> git.madduck.net Git - etc/awesome.git/blobdiff - .config/awesome/clocksarray.lua

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:

Merge commit '33c0e0c2360a04fcc6f51bccb0ad2a7a9e9c07b3'
[etc/awesome.git] / .config / awesome / clocksarray.lua
index eed124e274760d6cb1a4b2e80e880b6bb5594d80..1a71d34ceead29702c59110a83aa5d6005f4e330 100644 (file)
@@ -7,10 +7,10 @@ local tblutils = require("tblutils")
 local module = {}
 
 local function get_textclocks_for_timezones(zones)
 local module = {}
 
 local function get_textclocks_for_timezones(zones)
-    local now = luatz.time_in(nil)
+    local now = math.floor(luatz.time_in(nil))
     local ret = {}
     for c, tz in tblutils.sorted_pairs(zones) do
     local ret = {}
     for c, tz in tblutils.sorted_pairs(zones) do
-        local t = luatz.time_in(tz)
+        local t = math.floor(luatz.time_in(tz))
         if math.abs(os.difftime(t, now)) > 10 then
             local widget = wibox.widget.textclock(c .. ": %H:%M (%a)", 60, tz)
             ret[#ret+1] = widget
         if math.abs(os.difftime(t, now)) > 10 then
             local widget = wibox.widget.textclock(c .. ": %H:%M (%a)", 60, tz)
             ret[#ret+1] = widget