Browse files

localizeddate filter : now IntlDateFormatter uses timezone from "PHP …

…ini setting", and not from "TZ environment variable" (default behavior).
  • Loading branch information...
1 parent f904575 commit 32d3eec393447aff0451425aa9cea027fdb48ce5 freepius44 committed Oct 10, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/Twig/Extensions/Extension/Intl.php
View
3 lib/Twig/Extensions/Extension/Intl.php
@@ -54,7 +54,8 @@ function twig_localized_date_filter($date, $dateFormat = 'medium', $timeFormat =
$formatter = IntlDateFormatter::create(
$locale !== null ? $locale : Locale::getDefault(),
$formatValues[$dateFormat],
- $formatValues[$timeFormat]
+ $formatValues[$timeFormat],
+ date_default_timezone_get()
);
if (!$date instanceof DateTime) {

0 comments on commit 32d3eec

Please sign in to comment.