mirror of
https://github.com/vichan-devel/vichan.git
synced 2025-02-25 22:48:00 +01:00
Merge pull request #749 from vichan-devel/RealAngeleno-datetime
fix bug with datetime
This commit is contained in:
commit
055d31d2db
@ -167,8 +167,12 @@ function twig_push_filter($array, $value) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function twig_date_filter($date, $format) {
|
function twig_date_filter($date, $format) {
|
||||||
$date = new DateTime($date, new DateTimeZone('UTC'));
|
if (is_numeric($date)) {
|
||||||
return $date->format($format);
|
$date = new DateTime("@$date", new DateTimeZone('UTC'));
|
||||||
|
} else {
|
||||||
|
$date = new DateTime($date, new DateTimeZone('UTC'));
|
||||||
|
}
|
||||||
|
return $date->format($format);
|
||||||
}
|
}
|
||||||
|
|
||||||
function twig_hasPermission_filter($mod, $permission, $board = null) {
|
function twig_hasPermission_filter($mod, $permission, $board = null) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user