Replace deprecated strftime calls

This commit is contained in:
Aaron van Geffen 2022-05-07 13:25:19 +02:00
parent 69417c36ed
commit 0ec0de4414
2 changed files with 4 additions and 4 deletions

View File

@ -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',
],
],

View File

@ -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;
}