# HG changeset patch # User Kim Alvefur # Date 1701516628 -3600 # Node ID 754f8eaad34c7651b1ce6d4f0dfd8788b2f607ad # Parent 59e38aaa3ec113cb792752b6f668a7a690dcf79e mod_audit: Fix error due to sub-second precision timestamps os.date() does not handle them diff -r 59e38aaa3ec1 -r 754f8eaad34c mod_audit/mod_audit.lua --- a/mod_audit/mod_audit.lua Sat Dec 02 12:23:15 2023 +0100 +++ b/mod_audit/mod_audit.lua Sat Dec 02 12:30:28 2023 +0100 @@ -221,7 +221,7 @@ end local colspec = { - { title = "Date", key = "when", width = 19, mapper = function (when) return os.date("%Y-%m-%d %R:%S", when); end }; + { title = "Date", key = "when", width = 19, mapper = function (when) return os.date("%Y-%m-%d %R:%S", math.floor(when)); end }; { title = "Source", key = "source", width = "2p" }; { title = "Event", key = "event_type", width = "2p" }; };