Skip to content

Commit

Permalink
clone the calendar before setting a new timezone
Browse files Browse the repository at this point in the history
closes #962
  • Loading branch information
ddelbondio committed Jan 6, 2009
1 parent 93e5ffc commit ea67d17
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ CHG: Always merge slot response metadata even if response content is null (#917)
CHG: Update timezone database to 2008i (#912) (David)
CHG: Add standard warning about broken libxml versions (#909) (David)

FIX: Using the timezone option in a locale string passed to _d() can possibly change the timezone of the given calendar object (#962) (Dominik)
FIX: AgaviTranslationManager::createCalendar() forgets TZ offset when called with DateTime object (#957) (Dominik)
FIX: Missing variable declaration in AgaviGettextTranslator (#968) (Dominik)
FIX: AgaviWebRequestDataHolder method implementations are all over the place (#955) (David)
Expand Down
1 change: 1 addition & 0 deletions src/translation/AgaviDateFormatter.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ public function translate($message, $domain, AgaviLocale $locale = null)
}

if(($zoneId = $locale->getLocaleTimeZone()) && !$localesEqual) {
$cal = clone $cal;
$cal->setTimeZone($this->context->getTranslationManager()->createTimeZone($zoneId));
}

Expand Down

0 comments on commit ea67d17

Please sign in to comment.