CC-3621: Calendar -> show contents (for a 24 hours show): It display "0:00:00" as total time of 24 hours show

-fixed
This commit is contained in:
denise 2012-04-12 17:07:27 -04:00
parent b0ac86ba43
commit 9d4a474521
1 changed files with 9 additions and 2 deletions

View File

@ -609,9 +609,16 @@ class Application_Model_ShowInstance {
$interval = $start->diff($end);
$days = $interval->format("%d");
$hours = sprintf("%02d" ,$interval->format("%h"));
if ($days > 0) return "24:" . $interval->format("%I:%S");
else return $interval->format("%h:%I:%S");
if ($days > 0) {
$totalHours = $days * 24 + $hours;
$returnStr = $totalHours . ":" . $interval->format("%I:%S") . ".00";
} else {
$returnStr = $hours . ":" . $interval->format("%I:%S") . ".00";
}
return $returnStr;
}
public function getShowListContent()