From: martin f. krafft Date: Sun, 17 Jun 2018 07:10:35 +0000 (+0200) Subject: round time data for maths operations X-Git-Url: https://git.madduck.net/etc/awesome.git/commitdiff_plain/13da3c9add75b33a140a47de718a698dfeb3ce18 round time data for maths operations --- 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