Convert jms timestamp to current date and time

I need to know when the message is received, so I print the timestamp jms ie msg.getJMSTimestamp() , but this returns a certain number in milliseconds, for example 1300339215983. I do not underestimate what value it has. How to convert it to the current standard date and time.

Thanks.

+4
source share
1 answer
 java.util.Date = new java.util.Date(msg.getJMSTimestamp()); 
+8
source

Source: https://habr.com/ru/post/1344046/


All Articles