From: Andrea Zucchelli Date: Sat, 10 Jun 2023 21:57:28 +0000 (+0200) Subject: fix:remove deprecated strftime X-Git-Tag: 4.6.0~14^2~19 X-Git-Url: https://git.p6c8.net/jirafeau_project.git/commitdiff_plain/c32806657b3b9e1548d5cf6c84a9d1f96dea0617?ds=sidebyside fix:remove deprecated strftime --- diff --git a/lib/functions.php b/lib/functions.php index cf89593..d6f7cb0 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -143,8 +143,11 @@ function jirafeau_human_size($octets) // Convert UTC timestamp to a datetime field function jirafeau_get_datetimefield($timestamp) { - $content = '' - . strftime('%Y-%m-%d %H:%M', $timestamp) . ' (GMT)'; + + $ts = date_create("@" . $timestamp); + $content = '' + . date_format($ts, 'Y-m-d H:i') . ' (GMT)'; + return $content; }