php 获取24点时间戳0点时间戳

//获得零点的时间戳
$time = strtotime(date('Ymd'));

//上一天时间戳
$date = strtotime(' - 1天');

//获得今天24点的时间戳
$time = strtotime(date('Ymd'))+ 86400;
//求当天0点 24点 时间戳
$dateStr = date('Y-m-d H:i:s', time());
//获取当天0点的时间戳
$timestamp0 = strtotime($dateStr);
//获取当天24点的时间戳
$timestamp24 = strtotime($dateStr) + 86400;

猜你喜欢

转载自blog.csdn.net/qq_41610686/article/details/85057622