[Solved] Java Confusion– Someone Translate?


The value you’re looking at, is seconds from epoch. It is not a duration, but actually a date. In JavaScript, you may convert this value to milliseconds from epoch, and construct a date object out of it.

See the following snippet:

var secondsFromEpoch = 1518292800;
var millisFromEpoch = secondsFromEpoch * 1000;
var date = new Date(millisFromEpoch);

console.log(date.toLocaleString());

So, this value represents the date Feb 11, 2018, and time 1:30am.

solved Java Confusion– Someone Translate?