projects
/
web/konrad/twig.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
3111e12
)
Force timezone setting in date filter
author
Andrew Baker
<abaker@inviqa.com>
Mon, 14 Jan 2013 16:07:52 +0000 (16:07 +0000)
committer
Andrew Baker
<abaker@inviqa.com>
Mon, 14 Jan 2013 16:07:52 +0000 (16:07 +0000)
lib/Twig/Extension/Core.php
patch
|
blob
|
history
diff --git
a/lib/Twig/Extension/Core.php
b/lib/Twig/Extension/Core.php
index
01eaee0
..
10baa20
100644
(file)
--- a/
lib/Twig/Extension/Core.php
+++ b/
lib/Twig/Extension/Core.php
@@
-473,7
+473,9
@@
function twig_date_converter(Twig_Environment $env, $date = null, $timezone = nu
return $date;
}
- return new DateTime($date, $defaultTimezone);
+ $date = new DateTime($date, $defaultTimezone);
+ $date->setTimezone($defaultTimezone);
+ return $date;
}
/**