Affects Version/s: 6.2.0 CE GA1
Environment:liferay-plugins Git ID : 43288f99ac9593b5c2734da79ea42a8f654ba98d
liferay-portal Git ID : f6b2af52bf7044aa838f88ccfcead2be837a5c22
Branch Version/s:6.2.x, 6.1.x
Backported to Branch:Committed
While two users are chatting, the received message display time in chat box sometimes exceeds the current system time.
Steps to reproduce :
1) Deploy chat portlet into portal
2) Create 2 users - user1 and user2
3) Open 2 browsers and log in with each of them
4) Start chatting
Sometimes we'll see the received message display time exceeds the current system time (See attached screenshot, you also see the seconds is because I did that for debugging)
PS : The issue is easier to replicate while sending message by the end of a minute
The message display time should not exceed current system time, it shows the current time at most
The root cause is that when a user logs in and starts a chat, an offset will be calculated and set. This offset can be several seconds to even minutes.
When converting to client timestamp, the display time is added by the offset. Sometimes this could exceed current system time.