I am trying to convert a long value (number of milliseconds elapsed from 1/1/1970 i.e. Epoch) to time of format
The long value I use as timestamp, I get from the field
timestamp of a logging event from log4j.
So far I've tried the following and it fails:
logEvent.timeStamp/ (1000*60*60) TimeUnit.MILLISECONDS.toMinutes(logEvent.timeStamp)
but I get incorrect value:
1289375173771 for logEvent.timeStamp 358159 for logEvent.timeStamp/ (1000*60*60) 21489586 for TimeUnit.MILLISECONDS.toMinutes(logEvent.timeStamp)
How do I go about this?