From 1577b7c41e84328d0a6124753377795d11188eeb Mon Sep 17 00:00:00 2001 From: Albert Santoni Date: Thu, 12 Dec 2013 16:39:20 -0500 Subject: [PATCH] CC-5627: Check all Application_Common_DateHelper calculations that use timezone. * Use the user timezone in eventFeedAction(), will fix a bug where shows at the edge of a week can disappear from the calendar if the user timezone is not the same as the station timezone. --- airtime_mvc/application/controllers/ScheduleController.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/application/controllers/ScheduleController.php b/airtime_mvc/application/controllers/ScheduleController.php index f77282926..518abee1f 100644 --- a/airtime_mvc/application/controllers/ScheduleController.php +++ b/airtime_mvc/application/controllers/ScheduleController.php @@ -116,9 +116,11 @@ class ScheduleController extends Zend_Controller_Action $service_user = new Application_Service_UserService(); $currentUser = $service_user->getCurrentUser(); - $start = new DateTime($this->_getParam('start', null)); + $userTimezone = new DateTimeZone(Application_Model_Preference::GetUserTimezone()); + + $start = new DateTime($this->_getParam('start', null), $userTimezone); $start->setTimezone(new DateTimeZone("UTC")); - $end = new DateTime($this->_getParam('end', null)); + $end = new DateTime($this->_getParam('end', null), $userTimezone); $end->setTimezone(new DateTimeZone("UTC")); $events = &Application_Model_Show::getFullCalendarEvents($start, $end,