MDL-76333 libraries: patch Bennu library for PHP 8.1 compatibility

This commit is contained in:
Marina Glancy 2022-11-16 16:50:47 +01:00
parent e45f7f691a
commit 47d3e4217b
2 changed files with 3 additions and 2 deletions

View File

@ -17,14 +17,14 @@ class Bennu {
if($t === NULL) {
$t = time();
}
return gmstrftime('%Y%m%dT%H%M%SZ', $t);
return gmdate("Ymd\\THis\\Z", $t);
}
static function timestamp_to_date($t = NULL) {
if ($t === NULL) {
$t = time();
}
return gmstrftime('%Y%m%d', $t);
return gmdate('Ymd', $t);
}
static function generate_guid() {

View File

@ -29,3 +29,4 @@ Changelog
10/ MDL-62914: added handling for TZURL property (13 July 2018)
11/ MDL-67029: replace curly by square brackets for string offsets. PHP 7.4 compatibility (25 Oct 2019)
12/ MDL-74866: fixed parameter parsing if the value is wrapped by DQUOTE character (28 Jul 2022)
13/ MDL-76333: replaced strftime() with date() for PHP 8.1 compatibility (16 Nov 2022)