Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

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

Merged
merged 1 commit into from

3 participants

@freepius

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.

freepius44 localizeddate filter : now IntlDateFormatter uses timezone from "PHP …
…ini setting", and not from "TZ environment variable" (default behavior).
32d3eec
@fabpot fabpot referenced this pull request from a commit
@fabpot fabpot 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.
dcdff02
@fabpot fabpot merged commit 32d3eec into twigphp:master
@stof

#57 would have been even better

@freepius

Yes, indeed.
I haven't the reflex.

Thanks for the merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 10, 2012
  1. localizeddate filter : now IntlDateFormatter uses timezone from "PHP …

    freepius44 authored
    …ini setting", and not from "TZ environment variable" (default behavior).
This page is out of date. Refresh to see the latest.
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) {
Something went wrong with that request. Please try again.