I have an existing time in DB in h:i A format Ex: 6.30 AM I am determining the current time as follows:
$datecalc = new DateTime("now", new DateTimeZone($time_zone));
$timesnow = $datecalc->format('h:i A'); //09.00 AM
//echo $timesnow;
But the following is not working??
$interval = date_diff($timesnow, $time_in_DB);
echo $interval; //NO RESULT
$time_in_DB is also in h:i A format.
Why is it not working or am i missing something as a newbie ??