2
0
forked from Wavyzz/dolibarr

Fix: PHP8.1 strftime deprecation -> dol_print_date

# Fix: PHP8.1 strftime deprecation -> dol_print_date

Change strftime to dol_print_date to work around deprecation
This commit is contained in:
MDW
2024-01-15 23:23:23 +01:00
parent 76f1b37d4f
commit aed39b73e5
11 changed files with 15 additions and 15 deletions

View File

@@ -2781,7 +2781,7 @@ function dol_format_address($object, $withcountry = 0, $sep = "\n", $outputlangs
function dol_strftime($fmt, $ts = false, $is_gmt = false)
{
if ((abs($ts) <= 0x7FFFFFFF)) { // check if number in 32-bit signed range
return ($is_gmt) ? @gmstrftime($fmt, $ts) : @strftime($fmt, $ts);
return ($is_gmt) ? @gmstrftime($fmt, $ts) : @dol_print_date($ts, $fmt);
} else {
return 'Error date into a not supported range';
}