From 46932856e743f653fe8ea6fb8b62b13d0f13fcfe Mon Sep 17 00:00:00 2001 From: Andrew Lewis Date: Fri, 4 Nov 2016 09:33:15 +0200 Subject: [PATCH] [Minor] Use single reference time in fuzzy_convert utility --- src/rspamadm/fuzzy_convert.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rspamadm/fuzzy_convert.lua b/src/rspamadm/fuzzy_convert.lua index 53a44354c..5db3c925b 100644 --- a/src/rspamadm/fuzzy_convert.lua +++ b/src/rspamadm/fuzzy_convert.lua @@ -148,9 +148,10 @@ return function (args, res) return end + local now = util.get_time() for row in db:rows('SELECT id, flag, digest, value, time FROM digests') do - local expire_in = math.floor(util:get_time() - row.time + res['expiry']) + local expire_in = math.floor(now - row.time + res['expiry']) if expire_in >= 1 then table.insert(digests, {row.digest, row.flag, row.value, expire_in}) num_batch_digests = num_batch_digests + 1 -- 2.39.5