我想获得平均小时数,但我遇到了问题,因为如果我使用 DateTime.add() 对象在超过 24 小时时添加时间,它会将时间转换为“日”。基本上我只想在“小时”内获得这些时间的平均值。请帮忙。
$time = array();
$time[] = '00:00:58';
$time[] = '00:45:08';
$time[] = '00:00:49';
$time[] = '00:11:26';
$time[] = '02:34:39';
$time[] = '02:18:24';
$time[] = '02:24:11';
$time[] = '01:23:19';
$time[] = '00:27:30';
$time[] = '02:14:50';
$time[] = '00:48:47';
$time[] = '02:19:52';
$time[] = '02:04:29';
$time[] = '01:08:46';
$time[] = '00:06:57';
$time[] = '00:35:31';
$time[] = '02:16:59';
$time[] = '02:23:33';
$time[] = '02:36:30';
$time[] = '02:11:47';
$time[] = '02:40:44';
$time[] = '02:03:42';
$time[] = '01:45:50';