CC-3746: Calendar: Duration of 24hrs show is 00h 00m
- fixed
This commit is contained in:
parent
24187ff39f
commit
8a2b9e7221
1 changed files with 11 additions and 1 deletions
|
@ -909,7 +909,17 @@ class ScheduleController extends Zend_Controller_Action
|
||||||
|
|
||||||
$duration = $UTCEndDateTime->diff($UTCStartDateTime);
|
$duration = $UTCEndDateTime->diff($UTCStartDateTime);
|
||||||
|
|
||||||
|
$day = intval($duration->format('%d'));
|
||||||
|
if($day > 0){
|
||||||
|
$hour = intval($duration->format('%h'));
|
||||||
|
$min = intval($duration->format('%i'));
|
||||||
|
$hour += $day * 24;
|
||||||
|
$hour = min($hour, 99);
|
||||||
|
$sign = $duration->format('%r');
|
||||||
|
$result = sprintf('%s%02dh %02dm', $sign, $hour, $min);
|
||||||
|
}else{
|
||||||
$result = $duration->format('%r%Hh %Im');
|
$result = $duration->format('%r%Hh %Im');
|
||||||
|
}
|
||||||
}catch (Exception $e){
|
}catch (Exception $e){
|
||||||
$result = "Invalid Date";
|
$result = "Invalid Date";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue