Time zone not enabled

Hello everyone, in GLPI version 10.0 I realized that the timezone is disabled again
Time zone usage has not been activated. Run the command “php bin/console glpi:database:enable_timezones” to activate it.

The script created with @stephdl is valid ??


#!/bin/bash

source /opt/rh/rh-mariadb105/enable 
mysql --socket=/run/rh-mariadb105-mariadb/glpi-mysql.sock -e "GRANT SELECT ON mysql.time_zone_name TO 'glpi'@'%';"
mysql --socket=/run/rh-mariadb105-mariadb/glpi-mysql.sock -e "FLUSH PRIVILEGES"
su - apache -s /bin/bash -c "/opt/rh/rh-php73/root/bin/php /usr/share/glpi/bin/console glpi:maintenance:enable"
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql --socket=/run/rh-mariadb105-mariadb/glpi-mysql.sock mysql
su - apache -s /bin/bash -c "/opt/rh/rh-php73/root/bin/php /usr/share/glpi/bin/console glpi:migration:timestamps --no-interaction"
su - apache -s /bin/bash -c "/opt/rh/rh-php73/root/bin/php /usr/share/glpi/bin/console glpi:maintenance:disable"

I think I solved it, indeed solved because the timezone is active with the possibility of defining the area to which it belongs.

php81  /usr/share/glpi/bin/console glpi:database:enable_timezones
Time zone usage has been enabled.
1 Like

you installed the new version of glpi 10 I provided…can you explain a bit what you occurred

rpm -qa | grep 'glpi'

Hi Sephane, here is the version I’ve been using for a long timenethserver-glpi-latest-1.0.8-1.ns7.sdl.noarch .
In the general settings as written earlier, GLPI reported that the time zone option was not enabled.

1 Like

will test with the new version

1 Like

sorry but I cannot reproduce, I never saw this warning, maybe it was relevant to your installation, BTW now we have a specific package for glpi10 (due to not compatible plugins between 9 to 10)

nethserver-glpi-10-latest (you need first to remove nethserver-glpi-latest, take a snapshot)

This worked for me, thank you!

1 Like

where did you see the warning to execute this command line ?

Hi at the moment I don’t remember, or I could tell you a fool as GLPI proposed through a comic in the interface the example of how to enable the timezone. Frankly I don’t remember, I certainly know it works.

Under the GUI of GLPI there was this hint:

php bin/console glpi:database:enable_timezones

Exactly now I remember, I just replaced the value of the php version