comparison mod_http_muc_log/mod_http_muc_log.lua @ 1556:0b80a02c2e3d

mod_http_muc_log: Search for next date with messages from 00:00:00, not 00:00:01
author Kim Alvefur <zash@zash.se>
date Sun, 09 Nov 2014 08:40:05 +0100
parents 2e51f70cd7ea
children 876af57a3983
comparison
equal deleted inserted replaced
1555:2e51f70cd7ea 1556:0b80a02c2e3d
268 local next_when = datetime.parse(date.."T12:00:00Z") + 86400; 268 local next_when = datetime.parse(date.."T12:00:00Z") + 86400;
269 local prev_when = datetime.parse(date.."T12:00:00Z") - 86400; 269 local prev_when = datetime.parse(date.."T12:00:00Z") - 86400;
270 270
271 module:log("debug", "Find next date with messages"); 271 module:log("debug", "Find next date with messages");
272 for key, message, when in archive:find(room, { 272 for key, message, when in archive:find(room, {
273 ["start"] = datetime.parse(date.."T00:00:00Z") + 86401; 273 ["start"] = datetime.parse(date.."T00:00:00Z") + 86400;
274 limit = math.huge; 274 limit = math.huge;
275 }) do 275 }) do
276 next_when = when; 276 next_when = when;
277 module:log("debug", "Next message: %s", datetime.datetime(when)); 277 module:log("debug", "Next message: %s", datetime.datetime(when));
278 break; 278 break;