projects
/
web/konrad/twig.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
a164469
)
Fixed the handling of the timezone for DateTime objects
author
Christophe Coevoet
<stof@notk.org>
Thu, 3 May 2012 20:25:04 +0000 (22:25 +0200)
committer
Christophe Coevoet
<stof@notk.org>
Thu, 3 May 2012 20:25:04 +0000 (22:25 +0200)
lib/Twig/Extension/Core.php
patch
|
blob
|
history
diff --git
a/lib/Twig/Extension/Core.php
b/lib/Twig/Extension/Core.php
index
301c4bb
..
37415ae
100644
(file)
--- a/
lib/Twig/Extension/Core.php
+++ b/
lib/Twig/Extension/Core.php
@@
-388,6
+388,7
@@
function twig_date_format_filter(Twig_Environment $env, $date, $format = null, $
if ($date instanceof DateInterval || $date instanceof DateTime) {
if (null !== $timezone) {
+ $date = clone $date;
$date->setTimezone($timezone instanceof DateTimeZone ? $timezone : new DateTimeZone($timezone));
}