MUC time format missing milliseconds .SSS

leo lee
Added about 3 years ago

1、when get MUC historys,the messages lose all milliseconds.I checked the source code,problem is the datetimeformat without ".SSS"

2、I get history by since(In my case is the lastest message time in this muc room),but the comparison in SQL is >=,then I got one more duplicate message every time.should I add 1ms to the since when I join into the room? or should I process duplicate message on the client side?

Replies (3)


Added by Bartosz Malkowski TigaseTeam about 3 years ago

  1. Yes. Dateformat is without .SSS but you can use it in since attribute.

  2. I don't want to use > instead of >= because if you request history since 2015-01-01, then you will receive messaged from 2015-01-02. The same if you receive only one of two message in 33 ms. Then if you request history since blahblah.033, then you loose one message.


Added by leo lee about 3 years ago

Yes.I totally agree with you about >=.

Even I can still use it in since attribute,but all of the muc messages from tigase are accurate to seconds,I can't understand the meaning behind it.Isn't is better the time accurate to milliseconds?

By the way,according to XEP-0203,"delay" use to stamp the message,when a new participant joins in the room,the server delivery the message to him.It represents as old messages.why tigase stamp all the muc messages even if the message which will be sent to online users?


Added by Bartosz Malkowski TigaseTeam about 3 years ago

We decided to stamp all messages because if time is not the same on client and on server, then client will have problem with find duplicates or requesting history.