js中把数据库时间转为正常值

function timeFormatter(value) {
var da = new Date(parseInt(value.replace("/Date(", "").replace(")/", "").split("+")[0]));
return da.getFullYear() + "-" + (da.getMonth() + 1) + "-" + da.getDate()
+ " " + da.getHours() + ":" + da.getMinutes() + ":" + da.getSeconds();
}

原文地址:https://www.cnblogs.com/liwp/p/5100182.html