• The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Forwarded to devs ICU version outdated? Timezone "Europe/Kyiv" throw U_ILLEGAL_ARGUMENT_ERROR

Azurel

Silver Pleskian
Username:

TITLE

ICU version outdated? Timezone "Europe/Kyiv" throw U_ILLEGAL_ARGUMENT_ERROR

PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE

Plesk Obsidian Version 18.0.48 with AlmaLinux 8.7

PROBLEM DESCRIPTION

In PHP 8.1.12 I get a error, when I use "Europe/Kyiv" in IntlDateFormatter()

See php timezones "Europe/Kyiv" PHP: Europa - Manual

php-ext/date DateTimeZone() known "Europe/Kiev" and "Europe/Kyiv"

php-ext/intl IntlDateFormatter() known only "Europe/Kiev"

I assume INTL is outdated? Because server shows me
ICU version 60.3
ICU Data version 60.3
ICU Unicode version 10.0

Currently is ICU version 72 with Unicode 15. See ICU - International Components for Unicode - Downloading ICU

Maybe I assume that solves the problem? I'm not sure, but that version is very old on AlmaLinux 8.7.

STEPS TO REPRODUCE

try code with php 8.1.12

$fmt = new IntlDateFormatter('en_US.utf8', IntlDateFormatter::NONE, IntlDateFormatter::NONE, 'Europe/Kyiv');

ACTUAL RESULT

datefmt_create: No such time zone: 'Europe/Kyiv': U_ILLEGAL_ARGUMENT_ERROR

EXPECTED RESULT

no error

ANY ADDITIONAL INFORMATION

Maybe this is not the solution to the problem, but something seems to be out of date here then?

Can anyone help me out here?

YOUR EXPECTATIONS FROM PLESK SERVICE TEAM

Confirm bug
 
We use ICU provided by the OS maintainers. Current ICU that RHEL 8-like distributions ship is 60.3: https://almalinux.pkgs.org/8/almalinux-baseos-x86_64/libicu-60.3-2.el8_1.x86_64.rpm.html

Europe/Kyiv alias was introduced in ICU 72: ICU-22118 tzdata2022b updates in icu code · unicode-org/icu@2673378

Currently, no stable distribution provides ICU 72, as it has not yet been stabilized. It will likely be shipped as part of Debian 12, Ubuntu 24.04 and RHEL 10.

Note: this timezone alias is available in php-date because it uses tzdata for timezones, which is updated constantly by OS maintainers.
 
I have to ask again because I have the problem again. For example with "America/Ciudad_Juarez" which exists in timezone_identifiers_list() but is not available in datefmt_create(). This is a serious problem when timezones cannot be used. Is there a support article explaining how to update the system to the latest version?

Example in PHP: List of Supported Timezones - Manual there is a note:
Note: The latest version of the timezone database can be installed via PECL's » timezonedb.
and \timezonedb-2023.3.tgz.3b1\timezonedb-2023.3\timezonedb.h contain "America/Ciudad_Juarez".

So is this not a bug, because this lastest version is not installed via PECL?
Any help would be great on how to solve the problem to suit Plesk.
 
I wanted to mention again that with Plesk PHP 8.2 the following timezones in INTL are not usable:

America/Ciudad_Juarez
America/Nuuk
Europe/Kyiv
Pacific/Kanton
 
Feedback on this would be nice, as I have had several users in the meantime who want to select time zones that do not work.
datefmt_create: No such time zone: 'America/Ciudad_Juarez': U_ILLEGAL_ARGUMENT_ERROR
 
Hi Azurel,

Have you tried a solution from https://support.plesk.com/hc/en-us/articles/15233115709463-How-to-install-PECL-packages-in-Plesk? I have tried it just to test on my test server,

1. I have searched and installed the PECL package,
1705667829174.png

2. ...checked that the package is installed and enabled,
1705667872519.png

3. ...written a short script to test that everything works well,
1705668182397.png

4. and as a result, I have got
Code:
It is now: "20240119 02:42 PM" in Europe/Kyiv
It is now: "20240119 05:42 AM" in America/Ciudad_Juarez
 
Thank you very much for this information. I didn't even know the PECL Manager. I tried it, but for me its not working. The package timezonedb is now installed and enabled, but I still get the errors. I check the complete list with:

PHP:
echo 'PHP Version = '.phpversion();
       $list = timezone_identifiers_list();
        foreach ($list as $timezone)
        {
            try
            {
                $fmt = new IntlDateFormatter('en_US.utf8', IntlDateFormatter::NONE, IntlDateFormatter::NONE, $timezone);
            }
            catch (Exception $e)
            {
                echo '<br>'.$e->getMessage();
            }
        }

Output:
PHP Version = 8.2.14
datefmt_create: No such time zone: 'America/Ciudad_Juarez': U_ILLEGAL_ARGUMENT_ERROR
datefmt_create: No such time zone: 'America/Nuuk': U_ILLEGAL_ARGUMENT_ERROR
datefmt_create: No such time zone: 'Europe/Kyiv': U_ILLEGAL_ARGUMENT_ERROR
datefmt_create: No such time zone: 'Pacific/Kanton': U_ILLEGAL_ARGUMENT_ERROR
 

Attachments

  • pecl.jpg
    pecl.jpg
    187.4 KB · Views: 9
Yes, that's the reason why it works for you and it should have worked from the beginning without the PECL package.

Jim said:
The PECL package only affects PHP's internal date manipulation, not libicu that the INTL extension uses. The only way to get INTL's timezone database to be updated is to have libicu's timezone files updated. Your webhost would need to download, point ICU to the new tzdb files, and restart their servers.

@IgorG
Is this a solution that plesk can add or create a support article about this?
 
I found the original request to the developers where they answered that
We use ICU provided by the OS maintainers. Current ICU that RHEL 8-like distributions ship is 60.3: https://almalinux.pkgs.org/8/almalinux-baseos-x86_64/libicu-60.3-2.el8_1.x86_64.rpm.html
In fact, nothing changed for AlmaLinux8. I see that AlmaLinux9 has 67.1 (https://almalinux.pkgs.org/9/almalinux-baseos-x86_64/libicu-67.1-9.el9.i686.rpm.html).

It seems it is possible to update timezones for ICU, have you seen Updating the Time Zone Data?
 
It seems it is possible to update timezones for ICU, have you seen Updating the Time Zone Data?
This is exactly what the Stackoverflow article explains. However, I would like Plesk to implement it accordingly so that it applies to everyone and is already available when moving to another server.

@Peter Debik
Can this be implemented or create a support article about this? This affects all RHEL 8 systems and even the new systems can be certainly be affected in one of the upcoming PHP updates. These timezone updates are inserted in PHP intermediate versions and the ICU of the system can become obsolete at any time. So an automatic update would be great.
 
Back
Top