From 3e5a6b2a3d715f2cb80d2c6b9483037f08cae8af Mon Sep 17 00:00:00 2001 From: denise Date: Wed, 25 Sep 2013 16:40:55 -0400 Subject: [PATCH] CC-5323: User's Timezone Can Improperly Edit Show Edit show from was displaying rebroadcast dates in user's timezone instead of in the show's timezone --- airtime_mvc/application/services/ShowFormService.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/application/services/ShowFormService.php b/airtime_mvc/application/services/ShowFormService.php index 2ef3b3c3d..2cd85ae85 100644 --- a/airtime_mvc/application/services/ShowFormService.php +++ b/airtime_mvc/application/services/ShowFormService.php @@ -305,13 +305,14 @@ class Application_Service_ShowFormService private function populateFormRebroadcastAbsolute($form) { $absolutRebroadcasts = $this->ccShow->getRebroadcastsAbsolute(); + $timezone = $this->ccShow->getFirstCcShowDay()->getDbTimezone(); $formValues = array(); $i = 1; foreach ($absolutRebroadcasts as $ar) { //convert dates to user's local time $start = new DateTime($ar->getDbStarts(), new DateTimeZone("UTC")); - $start->setTimezone(new DateTimeZone(Application_Model_Preference::GetTimezone())); + $start->setTimezone(new DateTimeZone($timezone)); $formValues["add_show_rebroadcast_date_absolute_$i"] = $start->format("Y-m-d"); $formValues["add_show_rebroadcast_time_absolute_$i"] = $start->format("H:i"); $i++;