Merge branch '2.4.x' into ryerson-history

This commit is contained in:
Naomi Aro 2013-09-07 16:41:57 +02:00
commit 0d089b787d
2 changed files with 43 additions and 41 deletions

View file

@ -14,7 +14,8 @@ class Application_Common_Timezone
'Australia' => DateTimeZone::AUSTRALIA, 'Australia' => DateTimeZone::AUSTRALIA,
'Europe' => DateTimeZone::EUROPE, 'Europe' => DateTimeZone::EUROPE,
'Indian' => DateTimeZone::INDIAN, 'Indian' => DateTimeZone::INDIAN,
'Pacific' => DateTimeZone::PACIFIC 'Pacific' => DateTimeZone::PACIFIC,
'UTC' => DateTimeZone::UTC
); );
$tzlist = array(); $tzlist = array();

View file

@ -964,8 +964,9 @@ SQL;
*/ */
if (isset($lastCreatedShow)) { if (isset($lastCreatedShow)) {
/* Set UTC to local time before setting the next repeat date. If we don't /* Set UTC to local time before setting the next repeat date. If we don't
* the next repeat date might be scheduled for the following day */ * the next repeat date might be scheduled for the following day
$lastCreatedShow->setTimezone(new DateTimeZone(Application_Model_Preference::GetTimezone())); * THIS MUST BE IN THE TIMEZONE THE SHOW WAS CREATED IN */
$lastCreatedShow->setTimezone(new DateTimeZone($timezone));
$nextDate = $lastCreatedShow->add($repeatInterval); $nextDate = $lastCreatedShow->add($repeatInterval);
$this->setNextRepeatingShowDate($nextDate->format("Y-m-d"), $day, $show_id); $this->setNextRepeatingShowDate($nextDate->format("Y-m-d"), $day, $show_id);
} }