PHP回合时间,保持字符串格式


php round time, keep string format

我使用以下方法将时间四舍五入为一分钟:

$mytime = mdate("H:i:s", $time_in_seconds);   
$rounded_time = date('H:i:s', round(strtotime($mytime)/60)*60);

例如,输出为:来自未舍入01:08:3401:09:00

如何使用代码但保留秒格式而不是更改日期?

使用

$rounded_time = date('H:i:0');