powered by Jive Software

Where is the Timestamp

Hi there

How do I access the time the message was sent?

ie: in Muse I would do the following:

DelayXMessage delay = msg.getDelayMessage();

String timestamp = new Date().toString();

timestamp = delay.getTimeInLocal().toString();

Many thanks



Are you trying to get the timestamp of a message that was sent to you while you were offline or while you were online?

Case online:

The Message class does not hold the timestamp when the packet was sent. You can calculate it in your PacketListener if you want.

Case offline:

Currently Smack does not implement “JEP-0091: Delayed Delivery” which is the extension that allows to obtain the time when the Message or Presence was originally sent. If you need this information it would be rather easy to add this extension. Let us know if you need any help on this.


– Gato

Thanks Gato.

I’‘m just rebuilding my web client using the smack library and doing comparisons between it and the Muse api. It would be nice to know when a delayed message was sent, but I’'ll live without it for now

JEP 91 is informational. Does anyone know if there is a standards-track JEP for this feature?


I don’'t know of any related standads track JEPs.