mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-26 22:12:05 +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:
parent
3157a29d28
commit
8c2ea94613
1 changed files with 2 additions and 0 deletions
|
@ -21,6 +21,7 @@
|
||||||
package org.jivesoftware.smackx.provider;
|
package org.jivesoftware.smackx.provider;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.TimeZone;
|
||||||
|
|
||||||
import org.jivesoftware.smack.packet.PacketExtension;
|
import org.jivesoftware.smack.packet.PacketExtension;
|
||||||
import org.jivesoftware.smack.provider.PacketExtensionProvider;
|
import org.jivesoftware.smack.provider.PacketExtensionProvider;
|
||||||
|
@ -42,6 +43,7 @@ public class DelayInformationProvider implements PacketExtensionProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
public PacketExtension parseExtension(XmlPullParser parser) throws Exception {
|
public PacketExtension parseExtension(XmlPullParser parser) throws Exception {
|
||||||
|
DelayInformation.UTC_FORMAT.setTimeZone(TimeZone.getTimeZone("GMT+0"));
|
||||||
Date stamp = DelayInformation.UTC_FORMAT.parse(parser.getAttributeValue("", "stamp"));
|
Date stamp = DelayInformation.UTC_FORMAT.parse(parser.getAttributeValue("", "stamp"));
|
||||||
DelayInformation delayInformation = new DelayInformation(stamp);
|
DelayInformation delayInformation = new DelayInformation(stamp);
|
||||||
delayInformation.setFrom(parser.getAttributeValue("", "from"));
|
delayInformation.setFrom(parser.getAttributeValue("", "from"));
|
||||||
|
|
Loading…
Reference in a new issue