MUC: fix timezone support when sending history
authorKim Alvefur <zash@zash.se>
Tue, 12 Oct 2010 23:34:16 +0200
changeset 3516 de54a7ab7e6e
parent 3515 bb494c3aa364
child 3517 530f7de1d265
MUC: fix timezone support when sending history
plugins/muc/muc.lib.lua
--- a/plugins/muc/muc.lib.lua	Fri Oct 08 03:19:20 2010 +0100
+++ b/plugins/muc/muc.lib.lua	Tue Oct 12 23:34:16 2010 +0200
@@ -178,7 +178,7 @@
 		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;