\PHP
dhms_time_format.txt
This code formats a time in seconds to the appropriate Days, Hours, Minutes, Seconds format.
Example:
echo seconds_format(92345);
Questions, contact Joshs@santsys.com
function seconds_format($size)
{
$day = 0;
$hour = 0;
$minute = 0;
$second = 0;
$day = floor($size / 60 / 60 / 24);
$size = $size - ($day * 24 * 60 * 60);
$hours = floor(($size / 60 / 60));
$size = $size - ($hours * 60 * 60);
$minutes = floor(($size / 60));
$size = $size - ($minutes * 60);
$seconds = $size;
$size = $day."d ".$hours."h ".$minutes."m ".$seconds."s";
return $size;
}