我遇到日期差异问题。例如
$nToday = date("Y-m-d h:i:s");
$deliveryDateNoon = $_SESSION['sp_date']." 12:00:00";
$date1 = new DateTime($nToday);
$date3 = new DateTime($deliveryDateNoon);
$diffNoon = $date3->diff($date1);
$hrs = $diffNoon->format('%h');
$ntoday="2014-10-30 10:01:46"
$deliveryDateNoon="10/31/2014 12:00:00"
我得到的价值$hrs
是... 1