why this is different:select from_unixtime(1383699655)
, I get '2013-11-06 09:00:55'
, but when I convert 1383699655 tojava.util.Date,new Date(1383699655)
, I get the Sat Jan 17 08:21:43 CST 1970
The unix timestamp is in seconds and java Date
needs milliseconds.
Thus you must convert
new Date(1383699655 * 1000L)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With