function
formatDateTime(timeStamp){
vardate =newDate();
date.setTime(timeStamp *1000);
vary = date.getFullYear();
varm = date.getMonth() +1;
m = m <10? ('0'+ m) : m;
vard = date.getDate();
d = d <10? ('0'+ d) : d;
varh = date.getHours();
h = h <10? ('0'+ h) : h;
varminute = date.getMinutes();
varsecond = date.getSeconds();
minute = minute <10? ('0'+ minute) : minute;
second = second <10? ('0'+ second) : second;
returny +'-'+ m +'-'+ d+' '+h+':'+minute+':'+second;
};
网友评论