Permalink
Browse files

merged branch freepius44/master (PR #69)

This PR was merged into the master branch.

Commits
-------

32d3eec localizeddate filter : now IntlDateFormatter uses timezone from "PHP ini setting", and not from "TZ environment variable" (default behavior).

Discussion
----------

localizeddate filter : using of timezone from "PHP ini setting"

localizeddate filter : now IntlDateFormatter uses timezone from "PHP ini setting", and not from "TZ environment variable" (default behavior).

See the comment here : http://www.php.net/manual/fr/intldateformatter.create.php#108109

Thanks and regards.
  • Loading branch information...
fabpot committed Oct 10, 2012
2 parents f904575 + 32d3eec commit dcdff02fbac1282e6b8f4d0558cc7e9580105688
Showing with 2 additions and 1 deletion.
  1. +2 −1 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 dcdff02

Please sign in to comment.