getTime changes the dates on the date

0

I try to get the date I received it in a epoch format and print it on a table.

If I put it directly

(Date(Math.round(new Date().getTime(vencimiento[i])/1000.0))).toLocaleString('en-US')  

I get the correct date back, but if I try to save it and print it the date is totally different

var fechaVencimiento = new Date(Math.round(new Date().getTime(vencimiento[i])/1000.0));  console.log(fechaVencimiento);
    
asked by MarcOS 16.11.2017 в 17:14
source

0 answers