Merge branch '2.5.x' of dev.sourcefabric.org:airtime into 2.5.x
This commit is contained in:
commit
26d191ca79
|
@ -468,10 +468,7 @@ class Application_Service_ShowFormService
|
|||
$startDateTime = new DateTime($start);
|
||||
$endDateTime = new DateTime($end);
|
||||
|
||||
$UTCStartDateTime = $startDateTime->setTimezone(new DateTimeZone('UTC'));
|
||||
$UTCEndDateTime = $endDateTime->setTimezone(new DateTimeZone('UTC'));
|
||||
|
||||
$duration = $UTCEndDateTime->diff($UTCStartDateTime);
|
||||
$duration = $startDateTime->diff($endDateTime);
|
||||
|
||||
$day = intval($duration->format('%d'));
|
||||
if ($day > 0) {
|
||||
|
@ -482,7 +479,7 @@ class Application_Service_ShowFormService
|
|||
$sign = $duration->format('%r');
|
||||
return sprintf('%s%02dh %02dm', $sign, $hour, $min);
|
||||
} else {
|
||||
return $duration->format('%Hh %Im');
|
||||
return $duration->format('%r%Hh %Im');
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
return "Invalid Date";
|
||||
|
|
|
@ -693,7 +693,7 @@ function setAddShowEvents() {
|
|||
}
|
||||
})
|
||||
|
||||
function calculateDuration(endDateTime, startDateTime){
|
||||
function calculateDuration(startDateTime, endDateTime){
|
||||
var loadingIcon = $('#icon-loader-small');
|
||||
|
||||
loadingIcon.show();
|
||||
|
|
Loading…
Reference in New Issue