// 当天的零点的时间戳
//获取指定日期的时间戳
%U星期日是一周的第一天
echo strtotime(date('Y-m-d', time()));
echo strtotime(date('Y-m-d', time())) + 24 * 60 * 60;
//获取指定日期的时间戳
echo strtotime(date('Y-m-d H:i:s'));
echo strtotime('2016-09-21 16:20:32');
时间戳转换为可阅读的时间
echo date('Y-m-d H:i:s', 1474446032);
%U星期日是一周的第一天
%u星期一是一周的第一天
PHP时间戳转换为日期:
{$v['pay_time']|date='Y-m-d H:i:s',###}
js时间戳转换为日期:
function formatDate(now) {
var year=now.getYear();
var month=now.getMonth()+1;
var date=now.getDate();
var hour=now.getHours();
var minute=now.getMinutes();
var second=now.getSeconds();
return "20"+year+"-"+month+"-"+date+" "+hour+":"+minute+":"+second;
}
var d=new Date(1230999938);
alert(formatDate(d));