From: Christophe Coevoet Date: Thu, 3 May 2012 20:20:20 +0000 (+0200) Subject: Added a failing test demonstrating the bug with DateTime and timezones X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=a16446913a551babe019634d2a9b972c584708b1;p=web%2Fkonrad%2Ftwig.git 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. --- diff --git a/test/Twig/Tests/Fixtures/filters/date.test b/test/Twig/Tests/Fixtures/filters/date.test index edfe596..4425746 100644 --- a/test/Twig/Tests/Fixtures/filters/date.test +++ b/test/Twig/Tests/Fixtures/filters/date.test @@ -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