MDL-76537 core: Fix date_format_string() to work with php-intl
commit7827edc78d167bcc055930c8f890e60116905ac3
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Thu, 22 Dec 2022 23:01:26 +0000 (23 00:01 +0100)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Fri, 13 Jan 2023 08:57:28 +0000 (13 09:57 +0100)
treeb08de34138dcd9c8151c96821750a06aa8e95207
parent5dbac075be0533b1baa67b264e670e62f6089bf7
MDL-76537 core: Fix date_format_string() to work with php-intl

With Moodle 4.1 and up, we have stopped to work with strftime(),
because it's deprecated for PHP 8.1 and up and, instead we are
using core_date::strftime() that performs the conversions using
the php-intl extension.

The original strftime() had a lot of OS-specific dependencies,
both about locale names and charsets used to provide the information.

Instead, the php-intl gets rid of all those OS-specific nightmares
and only uses ICU/Unicode locales and UTF-8.

Because of that, the old utf-8 => windows charset => utf-8
conversions aren't needed anymore. Hence, removing them.
lib/moodlelib.php