将时间戳转换为天,时,分

2023-04-06 21:18:23 浏览数 (3)

function time2string($second){ $day = floor($second/(360024)); $second = $second%(360024); // 除去整天之后剩余的时间 $hour = floor($second/3600); $second = $second600; // 除去整小时之后剩余的时间 $minute = floor($second/60); $second = $second`; // 除去整分钟之后剩余的时间 // 返回字符串 return $day.’天’.$hour.’小时’.$minute.’分’; }

<?php echo time2string($_W[‘timestamp’]-$item[‘time’]) ?>

标签: none

0 人点赞