Why does my dates differ?
Hello!I got a strange problem that I hope I could get your excellent input about.
I receive a message from a mq-server.
I write to a database the JmsTimeStamp of the message as an long.
The JmsTimeStamp is = 1211183534650
To see this JmsTimeStamp in a better "readable" way I tried this in my Eclipse Scrapbook as:
System.out.println(new java.util.Date(1211183534650L));
This gave me:
Mon May 19 09:52:14 CEST 2008
But if I did this in my oracle:
select MESSAGE_ID, ( TO_DATE('01/01/1970', 'DD/MM/YYYY') + MESSAGE_TIMESTAMP/(24*60*60*1000)) as DATUM from MYLOG_MESSAGE_LOG order by DATUM DESC
Or the same with the long from the database:
select ( TO_DATE('01/01/1970', 'DD/MM/YYYY') + 1211183534650/(24*60*60*1000)) as DATUM from MYLOG_MESSAGE_LOG order by DATUM DESC
I get this:
2008-05-19 07:52:15
It differs 2 hour and 1 second????
To me the code looks ok, but somewhere 2 hours is missing.
Best regards
Fredrik
