# HG changeset patch # User Kim Alvefur # Date 1511218978 -3600 # Node ID 462dece0a3c284a085dc42ee1e076ac81ff4159d # Parent 683a2f25223d27f459388348dd7a4d9178b04a09 mod_http_muc_log: Parse date out of path once diff -r 683a2f25223d -r 462dece0a3c2 mod_http_muc_log/mod_http_muc_log.lua --- a/mod_http_muc_log/mod_http_muc_log.lua Mon Nov 20 20:47:38 2017 +0100 +++ b/mod_http_muc_log/mod_http_muc_log.lua Tue Nov 21 00:02:58 2017 +0100 @@ -191,11 +191,12 @@ return years_page(event, path); end if not public_room(room) then return end + local day_start = datetime.parse(date.."T00:00:00Z"); local logs, i = {}, 1; local iter, err = archive:find(room, { - ["start"] = datetime.parse(date.."T00:00:00Z"); - ["end"] = datetime.parse(date.."T23:59:59Z"); + ["start"] = day_start; + ["end"] = day_start + 86399; }); if not iter then module:log("warn", "Could not search archive: %s", err or "no error");