# получить ИМЕННО timestamp сегодняшней полуночи
$time = (new DateTime('today midnight'))->getTimestamp();
# получить время полуночи 11 декабря
$test = new DateTime();
$test->setDate('2019',12,11);
$test->setTime(0,0,0);
$timeX = $test->getTimestamp();
1 个回答