Q:JS中将时间戳转为日期
A:setTime()
function timeStamp2String(time) {
var datetime = new Date();
datetime.setTime(time);
var year = datetime.getFullYear();
var month = datetime.getMonth() + 1;
var date = datetime.getDate();
var hour = datetime.getHours();
var minute = datetime.getMinutes();
var second = datetime.getSeconds();
var mseconds = datetime.getMilliseconds();
return year + "-" + month + "-" + date + " " + hour + ":" + minute + ":" + second;
}