我需要将日期转换为 Java 纪元,然后读取并转换回来。不知道我在这里做错了什么?
var date = new Date('1/3/2013');
var timeStamp = date.getTime();
console.log(timeStamp);
var revertDate = new Date(timeStamp);
console.log(revertDate.getDate()+'/'+revertDate.getMonth()+'/'+revertDate.getFullYear());
输出是3/0/2013
instad 1/3/2013
?