// 时间戳转化成 yyyy-mm-dd hh:mm:ss 样式的时间
function dates(date){
var time = new Date(date * 1000); //根据时间戳生成的时间对象
var year = time.getFullYear();
var month = time.getMonth() + 1;
var date = time.getDate();
var hours = time.getHours();
var minutes = time.getMinutes();
var seconds = time.getSeconds();
if(month < 10){
month = "0" + month;
}
if(date < 10){
date = "0" + date;
}
if(hours < 10){
hours = "0" + hours;
}
if(minutes < 10){
minutes = "0" + minutes;
}
if(seconds < 10){
seconds = "0" + seconds;
}
return year+"-"+month+"-"+date+" "+hours+":"+minutes+":"+seconds;
}
function dates(date){
var time = new Date(date * 1000); //根据时间戳生成的时间对象
var year = time.getFullYear();
var month = time.getMonth() + 1;
var date = time.getDate();
var hours = time.getHours();
var minutes = time.getMinutes();
var seconds = time.getSeconds();
if(month < 10){
month = "0" + month;
}
if(date < 10){
date = "0" + date;
}
if(hours < 10){
hours = "0" + hours;
}
if(minutes < 10){
minutes = "0" + minutes;
}
if(seconds < 10){
seconds = "0" + seconds;
}
return year+"-"+month+"-"+date+" "+hours+":"+minutes+":"+seconds;
}