Merge branch '2.5.x' of dev.sourcefabric.org:airtime into 2.5.x

This commit is contained in:
Naomi 2013-10-10 12:07:22 -04:00
commit 26d191ca79
2 changed files with 3 additions and 6 deletions

View File

@ -468,10 +468,7 @@ class Application_Service_ShowFormService
$startDateTime = new DateTime($start); $startDateTime = new DateTime($start);
$endDateTime = new DateTime($end); $endDateTime = new DateTime($end);
$UTCStartDateTime = $startDateTime->setTimezone(new DateTimeZone('UTC')); $duration = $startDateTime->diff($endDateTime);
$UTCEndDateTime = $endDateTime->setTimezone(new DateTimeZone('UTC'));
$duration = $UTCEndDateTime->diff($UTCStartDateTime);
$day = intval($duration->format('%d')); $day = intval($duration->format('%d'));
if ($day > 0) { if ($day > 0) {
@ -482,7 +479,7 @@ class Application_Service_ShowFormService
$sign = $duration->format('%r'); $sign = $duration->format('%r');
return sprintf('%s%02dh %02dm', $sign, $hour, $min); return sprintf('%s%02dh %02dm', $sign, $hour, $min);
} else { } else {
return $duration->format('%Hh %Im'); return $duration->format('%r%Hh %Im');
} }
} catch (Exception $e) { } catch (Exception $e) {
return "Invalid Date"; return "Invalid Date";

View File

@ -693,7 +693,7 @@ function setAddShowEvents() {
} }
}) })
function calculateDuration(endDateTime, startDateTime){ function calculateDuration(startDateTime, endDateTime){
var loadingIcon = $('#icon-loader-small'); var loadingIcon = $('#icon-loader-small');
loadingIcon.show(); loadingIcon.show();