1、日期格式转时间戮
2、时间戮转日期格式
PHPTime(time)
{
var date = new Date(time * 1000);
Y = date.getFullYear() + '-';
M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1) + '-';
D = date.getDate() + ' ';
h = date.getHours() + ':';
m = date.getMinutes() + ':';
s = date.getSeconds();
原文链接:https://www.f2er.com/js/47662.html return Y+M+D+h+m+s;
}