Time zone in Dolibarr 24
Appointments shifted by one or two hours in Dolibarr: tested on Dolibarr 24.0.3 with appointments created under different settings. What the PHP server, computer and database time zones do, the MAIN_SERVER_TZ constant, the Docker PHP_INI_DATE_TIMEZONE variable, and why changing the time zone shifts existing data.
Want someone to look at your instance? Diagnosis, fixed price €90.
What was checked (versions, tests, code read)
Tests on 15/11/2026 on Dolibarr 24.0.3 under Docker (MariaDB), in the interface with a driven browser whose time zone was set at will (Europe/Paris or UTC). Agenda appointments created at 4 pm in four situations (PHP in UTC; MAIN_SERVER_TZ = Europe/Paris; browser in UTC; MariaDB global time zone set to +05:00), times read on screen and in the database after each change. Fixes tested: date.timezone in a PHP .ini file, PHP_INI_DATE_TIMEZONE variable when starting the container, MAIN_SERVER_TZ constant (including against a different php.ini). Interface run in French; English labels taken from the Dolibarr 24.0.3 language files. Dolibarr 24.0.3 code read (core/lib/date.lib.php, core/lib/functions.lib.php, core/db/DoliDB.class.php, core/class/conf.class.php, admin/system/dolibarr.php, main.inc.php) and the Docker image start script (docker-run.sh).
An appointment entered at 4 pm that shows at 3 pm, times shifted since a migration: the question comes up every year on the forum (2023, French, 2025, French). Answers mention three settings (PHP server, computer, database) without saying which one matters.
This guide was written on 15 November 2026 on a Dolibarr 24.0.3 under Docker. We created appointments at 4 pm while changing one setting at a time, and read the time on screen and in the database each time. Our test interface was in French; the English labels below come from Dolibarr’s language files.
1. What Dolibarr does, in short
- In the database, Dolibarr stores the time in the PHP server’s time zone. Our 4 pm appointment (Paris time) was stored as “15:00” with PHP in UTC, and “16:00” with PHP in Europe/Paris.
- On screen, it converts to each user’s browser time zone. According to the code, that time zone is read at login.
- The database time zone does not matter (tested below).
As a result, a server in UTC is not a problem in itself. With PHP in UTC and a computer on Paris time, our 4 pm appointment did show at 4 pm.
2. See the settings at a glance
Admin Tools > About Dolibarr, localization parameters section: database time zone, PHP server time zone and client time zone (your browser), with the time of each.

If “Client time (user)” is not the time on your watch, the problem is the computer, not the server.
3. Cause no. 1: the server time zone changed after data entry
This is the “everything has been shifted since the migration” case. Tested:
| Appointment entered at 4 pm | PHP in UTC | PHP switched to Europe/Paris |
|---|---|---|
| entered while PHP was in UTC (“15:00” in the database) | 16:00 | 15:00 |
| entered while PHP was in Europe/Paris (“16:00” in the database) | 17:00 | 16:00 |
Nothing changes in the database: Dolibarr reads the same times with another time zone. In November, Paris is one hour from UTC; in summer, the gap is two hours.
What to do: set back the time zone the server had when the data was entered (see part 5). No setting shows both old and new data correctly: as our table shows, each choice shifts one of the two rows. Choose the time zone once and for all, at the start.
4. Cause no. 2: the computer is not on the right time zone
Tested with a browser set to UTC, the server being in Europe/Paris:
- the 4 pm appointment showed at 3 pm;
- an appointment entered as “4 pm” from that computer showed at 5 pm for users on Paris time.
What to do: set the computer’s (or phone’s) time zone, then log in to Dolibarr again (the time zone is read at login, according to the code). The “Client Time Zone (user)” line on the About Dolibarr page lets you check.
5. Setting the server time zone: three ways, tested
| Situation | Setting | Tested |
|---|---|---|
| Regular server | date.timezone = Europe/Paris in the PHP configuration, then restart the web server |
yes (.ini file added) |
| Docker (official image) | PHP_INI_DATE_TIMEZONE=Europe/Paris variable on the dolibarr container |
yes |
| Hosting without php.ini access | MAIN_SERVER_TZ constant = Europe/Paris in Setup > Other Setup |
yes |
Checked details:
- On Docker, the variable defaults to
UTC, and the image’s start script rewrites its PHP settings file (withdate.timezone) at each start. A setting made by hand inside the container also disappears when the container is recreated. Add the variable to yourdocker-compose.ymlinstead, then recreate the container (docker compose up -d). MAIN_SERVER_TZwins over php.ini. Withdate.timezoneset to Europe/Paris andMAIN_SERVER_TZset to UTC, Dolibarr ran in UTC. Handy at a hosting provider, but remember it if the php.ini setting seems to have no effect.- Use a time zone name (Europe/Paris, Europe/Brussels…): with Europe/Paris, the About Dolibarr page showed daylight saving time as applying in summer, so the clock change is taken into account.
6. The database time zone: no effect
Tested: MariaDB global time zone changed from UTC to +05:00. No appointment moved, on screen or in the database, and a new 4 pm appointment was stored as “16:00” like the others. The help on the About Dolibarr page says so too: dates are stored like text, the database time zone has no effect. No need to change MySQL or MariaDB for a time problem in Dolibarr.
Common problems
| What you see | Verified cause | What to do |
|---|---|---|
| Old appointments shifted since a migration | PHP server time zone differs from the old one | set back the old time zone (php.ini, Docker variable or MAIN_SERVER_TZ) |
| Only one computer sees shifted times | computer on the wrong time zone | fix the computer, log in again |
| On Docker, PHP stays in UTC | image default value | PHP_INI_DATE_TIMEZONE variable |
| php.ini is right but Dolibarr ignores it | MAIN_SERVER_TZ constant set | fix or delete it in Setup > Other Setup |
| The MySQL time zone is “UTC” | normal, no effect | nothing |
What we did not test
Dates without time (invoice date) around midnight, the daylight saving switch, scheduled jobs, PostgreSQL, Windows and TakePOS (the date shift reported on the forum in 19.0 was not retested).
Summary
- In the database, the PHP server’s time; on screen, the browser’s.
- The About Dolibarr page shows the three time zones.
- Changing the server time zone shifts old data: choose it once and for all.
- One computer shifted: fix the computer and log in again.
- Server:
date.timezone,PHP_INI_DATE_TIMEZONEon Docker, orMAIN_SERVER_TZ, which wins. - The MySQL or MariaDB time zone does not matter.
Next
On Docker: installing Dolibarr with Docker Compose and updating it.
If the times in your Dolibarr are still wrong, the €90 diagnosis means looking at your installation with you for an hour, then giving you in writing what is blocking and what the fix would cost.
Frequently asked questions
Why are my Dolibarr appointments shifted by one hour?
Most often because the PHP server time zone changed after the data was entered (migration, new hosting, new container). Dolibarr stores times in the PHP server time zone: tested on Dolibarr 24.0.3, an appointment entered at 4 pm with a server in UTC shows at 3 pm once the server is switched to Europe/Paris. The other tested cause is a computer set to the wrong time zone: Dolibarr shows times in the browser's time zone.
How do I set Dolibarr's time zone without access to php.ini?
Add the MAIN_SERVER_TZ constant in Setup > Other Setup with a time zone name, for example Europe/Paris. Tested on Dolibarr 24.0.3: it overrides the php.ini time zone (checked in Admin Tools > About Dolibarr). Careful: changing the time zone shifts the display of appointments already entered.
Does the MySQL or MariaDB time zone matter for Dolibarr?
No, according to the test: MariaDB global time zone changed from UTC to +05:00, no appointment changed time, on screen or in the database, and a new 4 pm appointment was stored normally. The help on the About Dolibarr page says so too: Dolibarr does not use the database functions that depend on the time zone.