【发布时间】:2015-05-25 02:09:03
【问题描述】:
在我看来,这应该回显 11 小时,但它返回 12;我错过了什么?
$start_time = "06:00";
$end_time = "17:00";
$LOD = date("H:i", ((strtotime($end_time) - strtotime($start_time))));
echo "Length of day: " . $LOD . " hours";
更新:在 MAMP 环境中在我的 MBPro 上运行;系统时间设置为 24 小时。
【问题讨论】:
-
我刚试了一下,返回5小时,完全没有意义。
标签: php time mamp strtotime maxlength