- date: documentation ( source)
- strtotime: documentation ( source)
<?php
$date = new \DateTime();
$date->setTimezone(new \DateTimeZone('UTC'));
$test = strtotime($date->format('Y-m-d') . '00:00:00');
$datee = new \DateTime();
$datee->setTimezone(new \DateTimeZone('UTC'));
$testt = strtotime($datee->format('Y-m-d') . '23:59:59');
echo date('Y-m-d H:i:s', $test);
echo date('Y-m-d H:i:s', $testt);