标签:
/**
* 将秒数转为HH:MM:SS格式的时间
* @param $seconds
* @return string
*/
public static function GetHHMMSSBySeconds($seconds)
{
if ($seconds>3600*24)
{
$hours = intval($seconds/3600);
$leftSeconds = $seconds - $hours* 3600;
$time = sprintf(‘%02s‘,$hours).":".gmstrftime(‘%M:%S‘, $leftSeconds);
}else{
$time = gmstrftime(‘%H:%M:%S‘, $seconds);
}
return $time;
}
标签:
原文地址:http://www.cnblogs.com/diguaer/p/5609949.html