This commit is contained in:
mkm 2024-01-16 16:35:00 +08:00
parent 06696cfb0b
commit 66e764a2e9

View File

@ -605,12 +605,13 @@ class Project extends BasicApi
$endTime = strtotime($find['end_date']);
if ($endTime > $createTime) {
$timeDifference = abs($endTime - $createTime);
$days = bcdiv($timeDifference,60,2);
if($days>1){
$data[$k]['stop_time']=$days.'分钟';
if($timeDifference>60){
$days = bcdiv($timeDifference,60,2);
$data[$k]['stop_time']=$days.'分钟';
}else{
$data[$k]['stop_time']=$days.'秒';
$data[$k]['stop_time']=$timeDifference.'秒';
}
}
}