# HG changeset patch # User Kim Alvefur # Date 1511033971 -3600 # Node ID bd5eb429ebab044c8cf72222184cb95c381c87a1 # Parent 52a7c0f6aea15f0dd6eec48b37f5f648ce22c552 mod_http_muc_log: Round down timestamps to midnight in order to fix an off by one issue (thanks asterix) diff -r 52a7c0f6aea1 -r bd5eb429ebab mod_http_muc_log/mod_http_muc_log.lua --- a/mod_http_muc_log/mod_http_muc_log.lua Sat Nov 18 20:38:30 2017 +0100 +++ b/mod_http_muc_log/mod_http_muc_log.lua Sat Nov 18 20:39:31 2017 +0100 @@ -103,6 +103,8 @@ -- Lazy with many false positives local first_day = find_once(room, nil, 3); local last_day = find_once(room, { reverse = true }, 3); + first_day = date_floor(first_day); + last_day = date_floor(last_day); for when = first_day, last_day, 86400 do local t = os_date("!*t", when); dates:set(t.year, t.month, t.day, when );