geting the time and date of xmpp message

1,271 views
Skip to first unread message

Tolga Tanrıverdi

unread,
Jul 31, 2012, 6:53:48 AM7/31/12
to xmppfr...@googlegroups.com
Hello
I want to get the date and time of xmpp message sent.Is something like that possible or is it defined in any xep ?
I've tried to implement it on clientside but it has lots of disadvantages.
First I've added a child element to xmpp message for adding the current time while sending the message but then I realized every iphone has different timezones and even they can change the clock manually so I've decided it should be a server side timestamp.
But I couldnt figure out a way to do that?
Do you know anything about that?

Thanks
Tolga

tjg184

unread,
Jul 31, 2012, 12:52:49 PM7/31/12
to xmppfr...@googlegroups.com
I had a similar issue.

Take a look at XMPPAutoTime.h, which is well-documented.  This will allow you to get the server time and adjust on the client side.  

Hope this helps.  

Robbie Hanson

unread,
Jul 31, 2012, 2:27:14 PM7/31/12
to xmppfr...@googlegroups.com
If a message is not immediately deliverable to you (because you're not online), the server timestamps it and stores it in an offline database. The next time you sign in, the xmpp server will send you all the offline messages. Each of which will have been previously timestamped.

See XEP-0203, and the corresponding folder within the Extensions directory.

-Robbie Hanson

--
You received this message because you are subscribed to the Google Groups "XMPPFramework" group.
To post to this group, send email to xmppfr...@googlegroups.com.
To unsubscribe from this group, send email to xmppframewor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/xmppframework/-/JzzHtqpE8dAJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Tolga Tanrıverdi

unread,
Aug 1, 2012, 2:02:06 AM8/1/12
to xmppfr...@googlegroups.com
Thanks
but what if I want to get the timestamp of the online delivered messages.Is there anyway to accomplish that
Because I dont want to rely on clients time.I want to get all time information from server

2012/7/31 Robbie Hanson <robbie...@deusty.com>

Robbie Hanson

unread,
Aug 1, 2012, 2:55:27 AM8/1/12
to xmppfr...@googlegroups.com
XMPP is real-time (essentially). If the server didn't timestamp the message, then he/she just sent it. As in, timestamp == NOW. The only delay would be the time it took to go from client to server to you. Not too different from VoIP really.

-Robbie Hanson

Reply all
Reply to author
Forward
0 new messages