mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-27 17:00:52 +01:00
fix bug with datetime
This commit is contained in:
parent
3d797c95ca
commit
605f198d8c
@ -167,7 +167,11 @@ function twig_push_filter($array, $value) {
|
||||
}
|
||||
|
||||
function twig_date_filter($date, $format) {
|
||||
if (is_numeric($date)) {
|
||||
$date = new DateTime("@$date", new DateTimeZone('UTC'));
|
||||
} else {
|
||||
$date = new DateTime($date, new DateTimeZone('UTC'));
|
||||
}
|
||||
return $date->format($format);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user