CC-3478: Calendar->Show has some inconsistencies on special Days (e.g.

switching to Daylight Saving Time)

- added exception handling
This commit is contained in:
James 2012-04-26 10:56:08 -04:00
parent a9d125bc4d
commit 0fe4478bb5

View file

@ -900,6 +900,7 @@ class ScheduleController extends Zend_Controller_Action
$startParam = $this->_getParam('startTime');
$endParam = $this->_getParam('endTime');
try{
$startDateTime = new DateTime($startParam);
$endDateTime = new DateTime($endParam);
@ -909,6 +910,9 @@ class ScheduleController extends Zend_Controller_Action
$duration = $UTCEndDateTime->diff($UTCStartDateTime);
$result = $duration->format('%r%Hh %Im');
}catch (Exception $e){
$result = "Invalid Date";
}
echo Zend_Json::encode($result);
exit();