Hi!
I’m trying to get the time of an entity (the server of the user in this case), i’m using smack 4.1.5
I suppose that i have to do something like this:
EntityTimeManager timeManager = EntityTimeManager.getInstanceFor(connection);
String time = timeManager.getTime("jabber.at").getUtc();
This give me the next error:
org.jivesoftware.smack.XMPPException$XMPPErrorException: XMPPError: service-unavailable - cancel
at org.jivesoftware.smack.XMPPException$XMPPErrorException.ifHasErrorThenThrow(XMP PException.java:135)
at org.jivesoftware.smack.PacketCollector.nextResultOrThrow(PacketCollector.java:2 32)
at org.jivesoftware.smack.PacketCollector.nextResultOrThrow(PacketCollector.java:2 13)
at org.jivesoftware.smackx.time.EntityTimeManager.getTime(EntityTimeManager.java:1 11)
Looking at the debug window, i can see that the problem is that in the iq request, the “to” parameter is missing:
<iq id="8NVJ2-22" type="get">
<time xmlns="urn:xmpp:time"/>
</iq>
Is this a bug or i am doing something wrong?
Thanks in advance