【发布时间】:2014-08-01 23:36:06
【问题描述】:
时间戳:
1395660658
代码:
//timestamp conversion
exports.getCurrentTimeFromStamp = function(timestamp) {
var d = new Date(timestamp);
timeStampCon = d.getDate() + '/' + (d.getMonth()) + '/' + d.getFullYear() + " " + d.getHours() + ':' + d.getMinutes();
return timeStampCon;
};
这会根据时间格式正确转换时间戳,但日期始终是:
17/0/1970
为什么 - 干杯?
【问题讨论】:
标签: javascript