//ads:
?>
How to set time with DateTime modify?
PHP Snippet 1:
$periodauction = '2018-04-09T10:00:00';
$date = DateTime::createFromFormat('Y-m-d\TH:i:s', $periodauction)->modify('-1 day');
$date->setTime(18,0);
echo $date->format('Y-m-d\TH:i:s');
PHP Snippet 2:
2018-04-08T18:00:00