From 8c2ea94613089c99685aa60d65babed22ccf3f3e Mon Sep 17 00:00:00 2001 From: Derek DeMoro Date: Wed, 2 Mar 2005 07:31:58 +0000 Subject: [PATCH] The delayed information needs to use the same tz as specified by server to allow for correct date calculation. git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2463 b35dd754-fafc-0310-a699-88a17e54d16e --- .../jivesoftware/smackx/provider/DelayInformationProvider.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/org/jivesoftware/smackx/provider/DelayInformationProvider.java b/source/org/jivesoftware/smackx/provider/DelayInformationProvider.java index 48c41d16d..80f24be0a 100644 --- a/source/org/jivesoftware/smackx/provider/DelayInformationProvider.java +++ b/source/org/jivesoftware/smackx/provider/DelayInformationProvider.java @@ -21,6 +21,7 @@ package org.jivesoftware.smackx.provider; import java.util.Date; +import java.util.TimeZone; import org.jivesoftware.smack.packet.PacketExtension; import org.jivesoftware.smack.provider.PacketExtensionProvider; @@ -42,6 +43,7 @@ public class DelayInformationProvider implements PacketExtensionProvider { } public PacketExtension parseExtension(XmlPullParser parser) throws Exception { + DelayInformation.UTC_FORMAT.setTimeZone(TimeZone.getTimeZone("GMT+0")); Date stamp = DelayInformation.UTC_FORMAT.parse(parser.getAttributeValue("", "stamp")); DelayInformation delayInformation = new DelayInformation(stamp); delayInformation.setFrom(parser.getAttributeValue("", "from"));