I've got both human-readable and unix timestamps of starttime and endtime of an event -- how would I calculate the duration in hours:minutes:seconds format?
Thanks!
Untested:
$difference = $endUnixTime - $startUnixTime; $hours = floor($difference / 3600); $remainder = $difference % 3600; $minutes = floor($remainder / 60); $seconds = $remainder % 60;