Time issue after migration to docker

Good day,

After migration to docker, I noticed some times (generating files/actions) are a couple of hours off.

After checking the dolibarr info url dolibarr.php?mainmenu=home&leftmenu=admintools_info

I see that the PHP time and timezone is correct.
However, the “Client time (user)” is wrong.

TimeZone MySql (database) (database) UTC
TimeZone PHP (server) +2 (+7200) Europe/Brussels Daylight saving time: Yes
=> PHP Time (server) 14/10/2025 11:51
=> dol_print_date(0,dayhourtext) 01 January 1970 01:00
=> dol_get_first_day(1970,1,false) -3600 (=> dol_print_date() or idate() of this value = 01/01/1970 00:00)
=> dol_get_first_day(1970,1,true) 0 (=> dol_print_date() or idate() of this value = 01/01/1970 01:00)
Client Time Zone (user) (+0) Daylight saving time: No
=> Client time (user) 14/10/2025 09:51

For the life of me, I can’t figure out how to manipulate “Client time (user)”.
This doesn’t seem to be a value of the user profiles in Dolibarr.

Any tips please?

Your issue is on this line.

Client Time Zone (user) (+0) Daylight saving time: No

You need to set the correct time zone on the client at operating system level

@finalbeta which webbrowser are you using?

Hi,

@jonbendtsen , @tindoshox
We are having this with edge/chrome, multiple users. Alle users have a correct time zone set in the OS.

If I go to a random “what’s my timezone” website on the internet.
The info is correct:

Timezone info

Time on Server Mon, 20 Oct 2025 08:23:02 GMT
Time on Local Machine Mon Oct 20 2025 10:22:59 GMT+0200 (Midden-Europese zomertijd) (This is correct)

Hi,

as mentioned in a different therad: This is most likely an anti-tracking feature of Chrome. Try adjusting the privacy settings of Chrome for your location or use a different browser, e.g. Firefox.

See e.g. here Chrome displaying wrong time zone - Google Chrome Community

Hi @priojk

Thank’s for your input.

I can’t fix it this way.
Seems unlikely that any other site would show a correct time, but specifically Dolibarr would not.

what if you follow the link that @priojk posted and allow your dolibarr to know your location - or deny it?

Hi @jonbendtsen , Dolibarr does’t ask for location.
I manually changed the site settings to allow it anyway.
No change.

Would you be up for building your own docker image?

Dolibarr currently uses php-8.2-apache-bookworm, but there is also a trixie version on dockerhub

https://hub.docker.com/layers/library/php/8.2-apache-trixie/images/sha256-4ff5e7784e9262b0bf0eb98182ea2c2b490d7c1f27e07f4ad48cedc44c0ddcc8

you might even try using the PHP-8.3 or even 8.4 version of these images, they should be supported

Hi @jonbendtsen ,

I’m willing to. It may take a couple of days to get back to you.