例:"startTime":{"date":11,"hours":0,"seconds":0,"month":6,"timezoneOffset":-480,"year":118,"minutes":0,"time":1531238400000,"day":3},“
格式化函数如下:
function formatTime(ns) {
if (ns) {
var d = new Date(parseInt(ns.time + ""));
var year = d.getFullYear();
var month = d.getMonth() + 1;
var date = d.getDate();
var hour = d.getHours();
var minute = d.getMinutes();
var second = d.getSeconds();
return year + "-" + month + "-" + date + " " + hour + ":" + minute + ":" + second;
}
}