Diff

plugins/muc/muc.lib.lua @ 3516:de54a7ab7e6e

MUC: fix timezone support when sending history
author Kim Alvefur <zash@zash.se>
date Tue, 12 Oct 2010 23:34:16 +0200
parent 3510:711eb5bf94b4
child 3517:530f7de1d265
line wrap: on
line diff
--- 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;