Changeset

3516:de54a7ab7e6e

MUC: fix timezone support when sending history
author Kim Alvefur <zash@zash.se>
date Tue, 12 Oct 2010 23:34:16 +0200
parents 3515:bb494c3aa364
children 3517:530f7de1d265
files plugins/muc/muc.lib.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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;