mirror of
https://github.com/twigphp/Twig.git
synced 2026-08-31 04:27:00 +00:00
Added a failing test demonstrating the bug with DateTime and timezones
PHP DateTime objects are mutable so changing the timezone when displaying it affects the following code whereas it does not occur for other supported formats.
This commit is contained in:
@@ -4,9 +4,11 @@
|
||||
{{ date1|date }}
|
||||
{{ date1|date('d/m/Y') }}
|
||||
{{ date1|date('d/m/Y H:i:s', 'Europe/Paris') }}
|
||||
{{ date1|date('d/m/Y H:i:s') }}
|
||||
{{ date2|date }}
|
||||
{{ date2|date('d/m/Y') }}
|
||||
{{ date2|date('d/m/Y H:i:s', 'Europe/Paris') }}
|
||||
{{ date2|date('d/m/Y H:i:s') }}
|
||||
{{ date3|date }}
|
||||
{{ date3|date('d/m/Y') }}
|
||||
{{ date4|date }}
|
||||
@@ -26,9 +28,11 @@ return array(
|
||||
October 4, 2010 13:45
|
||||
04/10/2010
|
||||
04/10/2010 15:45:00
|
||||
04/10/2010 13:45:00
|
||||
October 4, 2010 13:45
|
||||
04/10/2010
|
||||
04/10/2010 15:45:00
|
||||
04/10/2010 13:45:00
|
||||
October 4, 2010 13:45
|
||||
04/10/2010
|
||||
October 4, 2010 13:45
|
||||
|
||||
Reference in New Issue
Block a user