- date_create: documentation ( source)
- date: documentation ( source)
- strtotime: documentation ( source)
- gmdate: documentation ( source)
<?php
// echo date( "Y-m-d", strtotime( "2009-12-01 -1 day" ) ).' 23:59:59';
$dateTo = strtotime(date('Y-m-d', strtotime('-1 day', date_create('2017-12-01 04:00:00')->getTimestamp())) ." 23:59:59");
echo gmdate("Y-m-d H:i:s", $dateTo);;
$dateTo = strtotime(date('Y-m-d', strtotime('-1 day')) ." 23:59:59");
echo gmdate("Y-m-d H:i:s", 1464739200);