Error in Chrome browser and others

Yes, the problem was the browsers derived from Chromiun (Brave, Chrome, Edge, etc…).
When I had the problem (Dolibarr 18, 19) I used Ubuntu 24.04 server with mysql Ver 15.1 Distrib 10.11.4-MariaDB, for debian-linux-gnu (x86_64), PHP 8.2.10-2ubuntu1 (cli) (built: Sep 5 2023 14:37:47) (NTS) as a server. It’s at the beginning of the post.
I am currently using Dolibarr 21.0.1 on Rocky Linux release 9.6 (Blue Onyx), with MariaDB Server 10.11.14 and PHP 8.3.26 (cli) (built: Sep 23 2025 17:57:26). Clients Windows and Linux. No problems.

I use Brave on Mac/iPhone/iPad with my Dolibarr running in a container, currently 21, but I started with 18 and I never ran into this issue

It only happened with the Argentine time zones.

and only with chrome based browsers?

Can one disable javascript on those to check if that has an influence?

No, change on blank page if i left the original code with disabled javascript .

@sumbudrule, please tell me which server you’re using. This happened to me on versions 18 and 19 on an Ubuntu server. I then installed it on a Rocky Linux server and had no problems. I installed version 20 there, then updated to 21, and now to 22. The server timezone (nginx, php-fpm) is America/Argentina/Buenos_Aires. It works perfectly, as explained above.

Thank you for sharing this critical piece of information! I got it working in Edge thanks to you.

First, I took a backup of functions.lib.php.

Then, I went to Line #3644 and replaced the following code:

$offsettzstring = (empty($_SESSION[‘dol_tz_string’]) ? ‘UTC’ : $_SESSION[‘dol_tz_string’]); // Example ‘Europe/Berlin’ or ‘Indian/Reunion’

if (class_exists(‘DateTimeZone’)) {
$user_date_tz = new DateTimeZone($offsettzstring);
$user_dt = new DateTime();
…

with:

$offsettzstring = (empty($_SESSION[‘dol_tz_string’]) ? ‘UTC’ : $_SESSION[‘dol_tz_string’]); // Example ‘Europe/Berlin’ or ‘Indian/Reunion’

// Fix deprecated timezone alias sent by some browsers (e.g., Edge/Chromium)
if ($offsettzstring === ‘Asia/Calcutta’) {
$offsettzstring = ‘Asia/Kolkata’;
}

if (class_exists(‘DateTimeZone’)) {
try {
$user_date_tz = new DateTimeZone($offsettzstring);
} catch (Exception $e) {
$offsettzstring = ‘UTC’;
$user_date_tz = new DateTimeZone($offsettzstring);
}
$user_dt = new DateTime();
…

Then restart Apache and clear the session cookies. Might be a good idea to take a backup of the modified functions.lib.php in case it’s overwritten.