mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-15 20:06:31 +00:00
6a3a42a30ead99e25767448ca8302c9ae3d48202
This PR was merged into the master branch.
Commits
-------
999b1c4 Force timezone setting in date filter
Discussion
----------
Force timezone setting in date filter
In instances where the $time parameter to the DateTime ctor includes a timezone, the $timezone argument is ignored. This functionality extends to the date filter.
http://uk3.php.net/manual/en/datetime.construct.php
"The $timezone parameter and the current timezone are ignored when the $time parameter either is a UNIX timestamp (e.g. @946684800) or specifies a timezone (e.g. 2010-01-28T15:00:00+02:00)."
Accepting this pull request is dependent on whether the desired functionality of the date filter should honour the PHP way of doing things, or the more logical and natural functionality anticipated by a Twig template designer; always ensuring the timezone passed into the date filter is applied.
…
Twig, the flexible, fast, and secure template language for PHP
Twig is a template language for PHP, released under the new BSD license (code and documentation).
Twig uses a syntax similar to the Django and Jinja template languages which inspired the Twig runtime environment.
More Information
Read the documentation for more information.
Description
Languages
PHP
99.9%
