From 13da3c9add75b33a140a47de718a698dfeb3ce18 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Sun, 17 Jun 2018 09:10:35 +0200 Subject: [PATCH] round time data for maths operations --- .config/awesome/clocksarray.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/awesome/clocksarray.lua b/.config/awesome/clocksarray.lua index eed124e..1a71d34 100644 --- a/.config/awesome/clocksarray.lua +++ b/.config/awesome/clocksarray.lua @@ -7,10 +7,10 @@ local tblutils = require("tblutils") 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 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 -- 2.39.5