回复讨论(解决方案)
$date = new DateTime('22:50:00');$date->add(new DateInterval('PT01H40M00S'));echo $date->format('H:i:s');00:30:00 只有版主这种方法吗 01:40:00这个需要转换下?
这样也行
echo date('H:i:s', strtotime('22:50:00') + strtotime('01:40:00') - strtotime('00:00:00'));00:30:00 吃别人嚼过的馍不香
要学会使用手中的工具
Call to undefined method DateTime::add() 没这个方法呢
这样也行
echo date('H:i:s', strtotime('22:50:00') + strtotime('01:40:00') - strtotime('00:00:00'));00:30:00 吃别人嚼过的馍不香
要学会使用手中的工具
什么工具
DateTime::add
(PHP 5 >= 5.3.0)
DateTime::add
(PHP 5 >= 5.3.0)
原来如此。。
这样也行
echo date('H:i:s', strtotime('22:50:00') + strtotime('01:40:00') - strtotime('00:00:00'));00:30:00 吃别人嚼过的馍不香
要学会使用手中的工具
什么工具
手册!!!