I am trying to get the number of minutes between two DateTimes in PHP:
$time = new DateTime($dateString);
$now = new DateTime;
$diff = $time->diff($now);
echo $diff->format('%m');
The result is always 0, although the DateTimes are several hours apart. How would I do this the right way?