Skip to content
This repository has been archived by the owner on Nov 2, 2020. It is now read-only.

Commit

Permalink
merged branch freepius44/master (PR #69)
Browse files Browse the repository at this point in the history
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 dcdff02
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Twig/Extensions/Extension/Intl.php
Expand Up @@ -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) {
Expand Down

0 comments on commit dcdff02

Please sign in to comment.