Replace calls to strftime() by calls to date().

PHP 8.1 deprecates strftime().
This commit is contained in:
Patrick Monnerat 2022-05-31 01:06:35 +02:00 committed by Deon George
parent b035e8a0f4
commit aeebf3faa6
2 changed files with 4 additions and 4 deletions

View File

@ -170,7 +170,7 @@ class HTMLTree extends Tree {
if (! is_null($server->inactivityTime())) {
$m = sprintf(_('Inactivity will log you off at %s'),
strftime('%H:%M',$server->inactivityTime()));
date('%H:%M',$server->inactivityTime()));
printf(' <img width="14" height="14" src="%s/timeout.png" title="%s" alt="%s"/>',IMGDIR,$m,'Timeout');
}
echo '</td></tr>';

View File

@ -1215,15 +1215,15 @@ class PageRender extends Visitor {
echo '<br/><small>';
if (($today < $shadow_date) && in_array(strtolower($attribute->getName()),$shadow_before_today_attrs))
printf('<span style="color:red">(%s)</span>',
strftime($_SESSION[APPCONFIG]->getValue('appearance','date'),$shadow_date));
date($_SESSION[APPCONFIG]->getValue('appearance','date'),$shadow_date));
elseif (($today > $shadow_date) && in_array(strtolower($attribute->getName()),$shadow_after_today_attrs))
printf('<span style="color:red">(%s)</span>',
strftime($_SESSION[APPCONFIG]->getValue('appearance','date'),$shadow_date));
date($_SESSION[APPCONFIG]->getValue('appearance','date'),$shadow_date));
else
printf('(%s)',
strftime($_SESSION[APPCONFIG]->getValue('appearance','date'),$shadow_date));
date($_SESSION[APPCONFIG]->getValue('appearance','date'),$shadow_date));
echo '</small><br />';
}