- print_r: documentation ( source)
- date_default_timezone_set: documentation ( source)
- explode: documentation ( source)
<?php
$cuttoff_time = "16:00";
date_default_timezone_set('Europe/London');
$datedelivery = new DateTime('NOW');
$store_ending_time = explode(":", $cuttoff_time); // what time on the day is cuttoff
$datedelivery->setTime($store_ending_time[0], $store_ending_time[1]);
$datedelivery->modify('+1 weekday');
print_r($datedelivery);