{
$h = intval($time/3600);
$minSeconds = $time%3600;
$i = intval($minSeconds/60);
$s = $minSeconds%60;
if($h<10)$h="0".$h;
if($i<10)$i="0".$i;
if($s<10)$s="0".$s;
$r = $format;
$r = str_replace("H",$h,$r);
$r = str_replace("i",$i,$r);
$r = str_replace("s",$s,$r);
return $r;
}