From 0ec0de441400c09a84e8b930953e90b034bcebac Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Sat, 7 May 2022 13:25:19 +0200 Subject: [PATCH] Replace deprecated strftime calls --- controllers/ManageErrors.php | 2 +- models/GenericTable.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/controllers/ManageErrors.php b/controllers/ManageErrors.php index 6113e048..d45d37f3 100644 --- a/controllers/ManageErrors.php +++ b/controllers/ManageErrors.php @@ -89,7 +89,7 @@ class ManageErrors extends HTMLController 'header' => 'UID', 'is_sortable' => true, 'parse' => [ - 'link' => BASEURL . '/member/?id={ID_USER}', + 'link' => BASEURL . '/edituser/?id={ID_USER}', 'data' => 'id_user', ], ], diff --git a/models/GenericTable.php b/models/GenericTable.php index 9356ccec..df54bda2 100644 --- a/models/GenericTable.php +++ b/models/GenericTable.php @@ -228,9 +228,9 @@ class GenericTable // Timestamps get custom treatment. case 'timestamp': if (empty($options['data']['pattern']) || $options['data']['pattern'] === 'long') - $pattern = '%F %H:%M'; + $pattern = 'Y-m-d H:i'; elseif ($options['data']['pattern'] === 'short') - $pattern = '%F'; + $pattern = 'Y-m-d'; else $pattern = $options['data']['pattern']; @@ -242,7 +242,7 @@ class GenericTable if (isset($options['data']['if_null']) && $timestamp == 0) $value = $options['data']['if_null']; else - $value = strftime($pattern, $timestamp); + $value = date($pattern, $timestamp); break; }