From c32806657b3b9e1548d5cf6c84a9d1f96dea0617 Mon Sep 17 00:00:00 2001 From: Andrea Zucchelli Date: Sat, 10 Jun 2023 23:57:28 +0200 Subject: [PATCH] fix:remove deprecated strftime --- lib/functions.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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; } -- 2.34.1