<?php
function formatSecondsToHMS($seconds) {
$hours = floor($seconds / 3600);
$minutes = floor(($seconds % 3600) / 60);
$seconds = $seconds % 60;
return sprintf('%02d:%02d:%02d', $hours, $minutes, $seconds);
}
$number = 1000;
echo formatSecondsToHMS($number );
php处理时间格式
最新推荐文章于 2024-08-17 22:56:29 发布