I'm trying to convert the following epoch time
1382364283
When plugging this into an online converter it gives me the correct results.
10/21/2013 15:00:28
But the following code
Long sTime = someTime/1000;
int test = sTime.intValue(); // Doing this to remove the decimal
Date date = new Date(test);
DateFormat format = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
String formatted = format.format(date);
this.doorTime = formatted;
Returns
16/01/1970 17:59:24
I've tried several other ways to convert this, is there something I'm missing?