1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-12-24 13:27:59 +01:00

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
This commit is contained in:
Derek DeMoro 2005-03-02 07:31:58 +00:00 committed by derek
parent 3157a29d28
commit 8c2ea94613

View file

@ -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"));