From c894565b4bb4299b2ae1d0acb4559e563b3bcd02 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 12 Oct 2010 23:34:16 +0200 Subject: MUC: fix timezone support when sending history --- plugins/muc/muc.lib.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index a3163349..785ebead 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -178,7 +178,7 @@ function room_mt:send_history(to, stanza) if seconds then seconds = datetime.datetime(os.time() - math.floor(seconds)); end local since = history_tag and history_tag.attr.since; - if since and not since:match("^%d%d%d%d%-%d%d%-%d%dT%d%d:%d%d:%d%dZ$") then since = nil; end -- FIXME timezone support + if since then since = datetime.parse(since); since = since and datetime.datetime(since); end if seconds and (not since or since < seconds) then since = seconds; end local n = 0; -- cgit v1.2.3