Skip to content

Commit aeebf3f

Browse files
monneratleenooks
authored andcommitted
Replace calls to strftime() by calls to date().
PHP 8.1 deprecates strftime().
1 parent b035e8a commit aeebf3f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/HTMLTree.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ protected function draw_server_name() {
170170

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

lib/PageRender.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1215,15 +1215,15 @@ protected function drawShadowDateShadowAttribute($attribute) {
12151215
echo '<br/><small>';
12161216
if (($today < $shadow_date) && in_array(strtolower($attribute->getName()),$shadow_before_today_attrs))
12171217
printf('<span style="color:red">(%s)</span>',
1218-
strftime($_SESSION[APPCONFIG]->getValue('appearance','date'),$shadow_date));
1218+
date($_SESSION[APPCONFIG]->getValue('appearance','date'),$shadow_date));
12191219

12201220
elseif (($today > $shadow_date) && in_array(strtolower($attribute->getName()),$shadow_after_today_attrs))
12211221
printf('<span style="color:red">(%s)</span>',
1222-
strftime($_SESSION[APPCONFIG]->getValue('appearance','date'),$shadow_date));
1222+
date($_SESSION[APPCONFIG]->getValue('appearance','date'),$shadow_date));
12231223

12241224
else
12251225
printf('(%s)',
1226-
strftime($_SESSION[APPCONFIG]->getValue('appearance','date'),$shadow_date));
1226+
date($_SESSION[APPCONFIG]->getValue('appearance','date'),$shadow_date));
12271227

12281228
echo '</small><br />';
12291229
}

0 commit comments

Comments
 (0)