- date_default_timezone_set: documentation ( source)
- date: documentation ( source)
- strtotime: documentation ( source)
<?php
date_default_timezone_set('UTC');
$timeNow = strtotime(date('h:i'));
$lastShip = strtotime('15:00');
$diff = $lastShip - $timeNow;
if($diff){
echo 'Order by '.date('H:i', $diff).' to to get same day dispatch';
}else{
#do nothing;
}
?>