Bug 38759 - koha-mysql doesn't work with timezone set in koha-conf.xml
Summary: koha-mysql doesn't work with timezone set in koha-conf.xml
Status: RESOLVED DUPLICATE of bug 38760
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-20 10:26 UTC by Katrin Fischer
Modified: 2025-04-09 10:51 UTC (History)
7 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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
Comment 1 Lukas Koszyk 2025-03-26 13:24:23 UTC
I rewrote the koha-mysql script in Bug 38760.
Could you check if it works with time zones?
Comment 2 David Cook 2025-03-27 03:09:23 UTC
I'm also curious what version this started in, since it works in older stable versions like 23.11.
Comment 3 Michaela Sieber 2025-04-09 10:29:43 UTC
Please see Bug 38760
Comment 4 Katrin Fischer 2025-04-09 10:49:59 UTC
(In reply to David Cook from comment #2)
> I'm also curious what version this started in, since it works in older
> stable versions like 23.11.

It can't have worked unless someone deleted lines - the timezone was not used at all (see the changes Lukasz made)
Comment 5 Katrin Fischer 2025-04-09 10:50:14 UTC

*** This bug has been marked as a duplicate of bug 38760 ***
Comment 6 Katrin Fischer 2025-04-09 10:51:09 UTC
(In reply to Katrin Fischer from comment #4)
> (In reply to David Cook from comment #2)
> > I'm also curious what version this started in, since it works in older
> > stable versions like 23.11.
> 
> It can't have worked unless someone deleted lines - the timezone was not
> used at all (see the changes Lukasz made)

Hm ok, the lines were only moved, but it did not work when we tested.