Re: Time formatting from int (seconds)
| From: | Denny 'DeKa' Bartelt | Date: | Sun, 17 Aug 2003 20:49:18 +0000 |
| Subject: | Re: Time formatting from int (seconds) | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-21179@lists.php.net to get a copy of this message | ||
> In my case I have the result of a subtraction of two
> date in which seconds are returned as in 980 seconds,
> 576 seconds etc. To make this readable to the user of
> the web page and so they do not need to mentally
> calculate the HHMMSS.
function duration($amount)
{
$offset = 255600;
return date("%H:%M:%S",$amount+$offset);
}
echo duration(980);