Bug 38759

Summary: koha-mysql doesn't work with timezone set in koha-conf.xml
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: Command-line UtilitiesAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: cornelius.amzar, lukasz.koszyk, markus.john, michaela.sieber, robin
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38760
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Katrin Fischer 2024-12-20 10:26:46 UTC
When a timezone is set in the koha-conf.xml file, the koha-mysql command doesn't work. This seems to be due to missing quotes around the timezone value.

For the timezone configuration see:
https://wiki.koha-community.org/wiki/Time_Zone_Configuration

If you dump the created connection command, you will see something like:

mysql --host=<host> --user=XXX --password=XXX --init-command=SET time_zone='America/Sao_Paulo' koha_XXX

This will result in an error. Quoting the value for the init-command parameter appears to fix the issue:

mysql --host=<host> --user=XXX --password=XXX --init-command="SET time_zone='America/Sao_Paulo'" koha_XXX