1 date_default_timezone_set("Africa/Johannesburg");
2 $now = new DateTime();
3 $future_date = new DateTime('2020-10-21 00:00:00');
4
5 $interval = $future_date->diff($now);
6
7 echo ($interval->format("%a") * 24) + $interval->format("%h"). " hours". $interval->format(" %i minutes ");
8 print_r($now->format('Y-m-d H:i:s'));
9