I need help. I have been trying to figure out why java util date is 5 hours behind after converting from C#
ticks.
in C#
, the date is 6/8/2013 11:02:07 AM, I convert this date into ticks then pass it to java as long
.
code snippet:
taken:
- long TICKS_AT_EPOCH = 621355968000000000L;
- long TICKS_PER_MILLISECOND = 10000;
java.util.Date date = new java.util.Date((ctime - TICKS_AT_EPOCH) / TICKS_PER_MILLISECOND);
Now java util date is Sat Jun 08 06:02:07 CDT 2013
Notice that the hour is 5 hours difference.
Any suggestions why?