mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-12 10:26:32 +00:00
7d30dc6f04f48264db8a82b0341a8460735e8b5b
Commits
-------
5699753 added setTimezone to allow globally overriding the timezone when formating dates
Discussion
----------
Allow setting global timezone for date formatting
My API returns dates in a string format of 2012-02-14T00:35:37+00:00. When parsed by the DateTime constructor, the timezone for that new object is UTC. Without specifying every time I use the date filter there was no way to globally influence the timezone used.
I added setTimezone() to the core extension that functions similar to setDateFormat() except that there is no timezone set by default to allow for backwards compatibility.
…
…
…
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%