public static function timetodate($c){
if($c < 86400){
$time = explode(' ',gmstrftime('%H %M %S',$c));
$duration = $time[0].'小时'.$time[1].'分'.$time[2].'秒';
}else{
$time = explode(' ',gmstrftime('%j %H %M %S',$c));
$duration = ($time[0]-1).'天'.$time[1].'小时'.$time[2].'分'.$time[3].'秒';
}
return $duration;
}

posted on 2019-10-24 08:25  caohongchang  阅读(756)  评论(0编辑  收藏  举报