From 9d4a474521ce10649d005dbc42f90b15d6517caf Mon Sep 17 00:00:00 2001 From: denise Date: Thu, 12 Apr 2012 17:07:27 -0400 Subject: [PATCH] CC-3621: Calendar -> show contents (for a 24 hours show): It display "0:00:00" as total time of 24 hours show -fixed --- airtime_mvc/application/models/ShowInstance.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/application/models/ShowInstance.php b/airtime_mvc/application/models/ShowInstance.php index 1c9217d71..db81782be 100644 --- a/airtime_mvc/application/models/ShowInstance.php +++ b/airtime_mvc/application/models/ShowInstance.php @@ -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()