比如:
$date1 = "2016-11-25 09:53:58";
$p_time = "00:02:34";
// $date1 + $p_time
结果输出:
"2016-11-25 09:56:32"
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
date('Y-m-d H:i:s',strtotime('+2minute 34seconds'));
若要将两个时间想加,将两个时间都转换成时间戳,然后再转换成时间。