CC-5323: User's Timezone Can Improperly Edit Show

-made localizeDate a static function in ShowFormService
This commit is contained in:
denise 2013-09-25 14:32:16 -04:00
parent 8ddb2974f1
commit 6aa6d576cd
2 changed files with 6 additions and 10 deletions

View file

@ -643,21 +643,16 @@ class ScheduleController extends Zend_Controller_Action
$this->_helper->json->sendJson(array("redrawLibTable" => $redrawLibTable));
}
/**
* When the timezone is changed in add-show form this function
* applies the new timezone to the start and end time
*/
public function localizeStartEndTimeAction()
{
$service_showForm = new Application_Service_ShowFormService();
$newTimezone = $this->_getParam('newTimezone');
$oldTimezone = $this->_getParam('oldTimezone');
$localTime = array();
$localTime["start"] = $service_showForm->localizeDateTime(
$localTime["start"] = Application_Service_ShowFormService::localizeDateTime(
$this->_getParam('startDate'), $this->_getParam('startTime'), $newTimezone, $oldTimezone);
$localTime["end"] = $service_showForm->localizeDateTime(
$localTime["end"] = Application_Service_ShowFormService::localizeDateTime(
$this->_getParam('endDate'), $this->_getParam('endTime'), $newTimezone, $oldTimezone);
$this->_helper->json->sendJson($localTime);