When I do this in php
echo date("Y/m/d",786668400);
I get 1994/12/06
but when I do this in javascript:
console.log(new Date(786668400*1000).getDate() + "." +
(new Date(786668400*1000).getMonth() + 1) + "." +
new Date(786668400*1000).getFullYear());
I get 5.12.1994
The date is wrong, it should be 6.12.1994
what am I doing wrong here?
console.log(new Date(786668400 * 1000).getDate() + "." +
(new Date(786668400 * 1000).getMonth() + 1) + "." +
new Date(786668400 * 1000).getFullYear());