Skip to content

Commit

Permalink
Move to date()
Browse files Browse the repository at this point in the history
The function strftime() is deprecated since PHP 8.2
  • Loading branch information
marcos-ng committed May 23, 2024
1 parent 4c6b85b commit cafdc4a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/etc/inc/util.inc
Original file line number Diff line number Diff line change
Expand Up @@ -3760,7 +3760,7 @@ function dhcpd_date_adjust_gmt($dt) {
if ($dhcpditem['dhcpleaseinlocaltime'] == "yes") {
$ts = strtotime($dt . " GMT");
if ($ts !== false) {
return strftime("%Y/%m/%d %H:%M:%S", $ts);
return date("Y/m/d H:i:s", $ts);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/usr/local/www/status_dhcpv6_leases.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ function adjust_gmt($dt) {
if ($dhcpv6leaseinlocaltime == "yes") {
$ts = strtotime($dt . " GMT");
if ($ts !== false) {
return strftime("%Y/%m/%d %H:%M:%S", $ts);
return date("Y/m/d H:i:s", $ts);
}
}
/* If we did not need to convert to local time or the conversion failed, just return the input. */
Expand Down

0 comments on commit cafdc4a

Please sign in to comment.