Skip to content
Browse files

explicitly set default timezone to fix date-only formatting

  • Loading branch information...
1 parent 713882a commit b2547bef16c8f970c7a4f388fffd2762eeee6435 @craue committed Jan 12, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 Twig/Extension/FormatDateTimeExtension.php
View
2 Twig/Extension/FormatDateTimeExtension.php
@@ -146,7 +146,7 @@ protected function getFormattedDateTime($value, $locale, $datetype, $timetype) {
$valueToUse = $value;
$localeToUse = !empty($locale) ? $locale : $this->getLocale();
- $formatter = new \IntlDateFormatter($localeToUse, $datetype, $timetype);
+ $formatter = new \IntlDateFormatter($localeToUse, $datetype, $timetype, date_default_timezone_get());
// IntlDateFormatter#format() doesn't support DateTime objects prior to PHP 5.3.4 (http://php.net/manual/intldateformatter.format.php)
if ($valueToUse instanceof \DateTime) {

0 comments on commit b2547be

Please sign in to comment.
Something went wrong with that request. Please try again.