Timezones¶
In order to get timezones working on a MariaDB/MySQL instance, you will have to initialize Timezones data and grant GLPI database user read ACL on their table.
Warning
Enabling timezone support on your MySQL instance may affect other database in the same instance; be carefull!
Warning
Currently, MySQL, and MariaDB (prior to 11.5), have a maximum date limited to 2038-01-19 on fields relying on timestamp
type!
MariaDB 11.5 onwards is limited to 2106.
Non windows users¶
On most systems, you’ll have to initialize timezones data from your system’s timezones:
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -p -u root mysql
You may want to check MariaDB documentation about mysql_tzinfo_to_sql and your system documentation to know where data are stored (if not in /usr/share/zoneinfo
).
Do not forget to restart the database server once command is successfull.
Windows users¶
Windows does not provide timezones informations, you’ll have to download and intialize data yourself.
Grant access¶
Warning
Be carefull not to give your GLPI database user too large access. System tables should never grant access to app users.
In order to list possible timezones, your GLPI database user must have read access on mysql.time_zone_name
table.
Assuming your user is glpi@localhost
, you should run something like:
GRANT SELECT ON `mysql`.`time_zone_name` TO 'glpi'@'localhost';