... to properly convert seconds into total hours, minutes and seconds (taking into account regional settings and without using a date function).
How?
$total_time =intval(intval($total_seconds)/ 3600).":";
$total_time.=str_pad(intval(($total_seconds/60)%60),2,"0",STR_PAD_LEFT).":";
$total_time.=str_pad(intval($total_seconds%60),2,"0",STR_PAD_LEFT);
// ...
We use cookies to improve your experience on our website. By browsing this website, you agree to our use of cookies. Read more about our Privacy Policy.