Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit dcdff02fbac1282e6b8f4d0558cc7e9580105688 2 parents f904575 + 32d3eec
@fabpot fabpot authored
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) {
Please sign in to comment.
Something went wrong with that request. Please try again.