Now that Koha can be set a timezone on a per-instance basis (bug 20123), we should provide a way to configure it on instance creation time. It should default to empty to keep the current behaviour.
Created attachment 73698 [details] [review] Bug 20525: Add --timezone switch to koha-create This patch adds a --timezone switch to koha-create so the timezone can be set on creation time. It defaults to empty (i.e. using the server's local time). To test: - Create an instance: $ sudo koha-create --create-db timezone1 => SUCCESS: /etc/koha/sites/timezone1/koha-conf.xml contains an empty <timezone> entry. - Apply this patch - Run: $ perl misc4dev/cp_debian_files.pl - Create a new instance: $ sudo koha-create --create-db timezone2 => SUCCESS: /etc/koha/sites/timezone2/koha-conf.xml contains an empty <timezone> entry (i.e. the current behaviour is preserved). - Create a new instance: $ sudo koha-create --create-db --timezone Your/Timezone timezone3 => SUCCESS: /etc/koha/sites/timezone3/koha-conf.xml contains <timezone>Your/Timezone</timezone> (i.e. introduced behaviour works) - Sign off :-D Sponsored-by: ByWater Solutions
It should be noted somewhere to remember to run: $ mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql
(In reply to M. Tompsett from comment #2) > It should be noted somewhere to remember to run: > $ mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql Mark, I'm working on a followup for about.pl to warn about invalid tz (and have C4::Context gently fallback and warn on bad timezones).
I noticed a change in debian/templates/koha-conf-site.xml.in but not in etc/koha-conf.xml as well. Is one built from the other? Is there a reason to only fix the .in version?
(In reply to M. Tompsett from comment #4) > I noticed a change in debian/templates/koha-conf-site.xml.in but not in > etc/koha-conf.xml as well. Is one built from the other? Is there a reason to > only fix the .in version? This bug is about koha-create setting a config entry introduced by a separate bug. If you want to have Makefile.PL ask for timezone and fill it, file a new bug report :-D
Created attachment 74823 [details] [review] Bug 20525: Add --timezone switch to koha-create This patch adds a --timezone switch to koha-create so the timezone can be set on creation time. It defaults to empty (i.e. using the server's local time). To test: - Create an instance: $ sudo koha-create --create-db timezone1 => SUCCESS: /etc/koha/sites/timezone1/koha-conf.xml contains an empty <timezone> entry. - Apply this patch - Run: $ perl misc4dev/cp_debian_files.pl - Create a new instance: $ sudo koha-create --create-db timezone2 => SUCCESS: /etc/koha/sites/timezone2/koha-conf.xml contains an empty <timezone> entry (i.e. the current behaviour is preserved). - Create a new instance: $ sudo koha-create --create-db --timezone Your/Timezone timezone3 => SUCCESS: /etc/koha/sites/timezone3/koha-conf.xml contains <timezone>Your/Timezone</timezone> (i.e. introduced behaviour works) - Sign off :-D Sponsored-by: ByWater Solutions
Created attachment 74827 [details] [review] Bug 20525: Add --timezone switch to koha-create This patch adds a --timezone switch to koha-create so the timezone can be set on creation time. It defaults to empty (i.e. using the server's local time). To test: - Create an instance: $ sudo koha-create --create-db timezone1 => SUCCESS: /etc/koha/sites/timezone1/koha-conf.xml contains an empty <timezone> entry. - Apply this patch - Run: $ perl misc4dev/cp_debian_files.pl - Create a new instance: $ sudo koha-create --create-db timezone2 => SUCCESS: /etc/koha/sites/timezone2/koha-conf.xml contains an empty <timezone> entry (i.e. the current behaviour is preserved). - Create a new instance: $ sudo koha-create --create-db --timezone Your/Timezone timezone3 => SUCCESS: /etc/koha/sites/timezone3/koha-conf.xml contains <timezone>Your/Timezone</timezone> (i.e. introduced behaviour works) - Sign off :-D Sponsored-by: ByWater Solutions Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Bug 18342 broke it... rebasing without the use-memcached.
Created attachment 75138 [details] [review] Bug 20525: Add --timezone switch to koha-create This patch adds a --timezone switch to koha-create so the timezone can be set on creation time. It defaults to empty (i.e. using the server's local time). To test: - Create an instance: $ sudo koha-create --create-db timezone1 => SUCCESS: /etc/koha/sites/timezone1/koha-conf.xml contains an empty <timezone> entry. - Apply this patch - Run: $ perl misc4dev/cp_debian_files.pl - Create a new instance: $ sudo koha-create --create-db timezone2 => SUCCESS: /etc/koha/sites/timezone2/koha-conf.xml contains an empty <timezone> entry (i.e. the current behaviour is preserved). - Create a new instance: $ sudo koha-create --create-db --timezone Your/Timezone timezone3 => SUCCESS: /etc/koha/sites/timezone3/koha-conf.xml contains <timezone>Your/Timezone</timezone> (i.e. introduced behaviour works) - Sign off :-D Sponsored-by: ByWater Solutions Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Created attachment 75141 [details] [review] Bug 20525: Add --timezone switch to koha-create This patch adds a --timezone switch to koha-create so the timezone can be set on creation time. It defaults to empty (i.e. using the server's local time). To test: - Create an instance: $ sudo koha-create --create-db timezone1 => SUCCESS: /etc/koha/sites/timezone1/koha-conf.xml contains an empty <timezone> entry. - Apply this patch - Run: $ perl misc4dev/cp_debian_files.pl - Create a new instance: $ sudo koha-create --create-db timezone2 => SUCCESS: /etc/koha/sites/timezone2/koha-conf.xml contains an empty <timezone> entry (i.e. the current behaviour is preserved). - Create a new instance: $ sudo koha-create --create-db --timezone Your/Timezone timezone3 => SUCCESS: /etc/koha/sites/timezone3/koha-conf.xml contains <timezone>Your/Timezone</timezone> (i.e. introduced behaviour works) - Sign off :-D Sponsored-by: ByWater Solutions Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Can we have a note on the wiki page about this flag?
Pushed to master for 18.05, thanks to everybody involved!
(In reply to Jonathan Druart from comment #11) > Can we have a note on the wiki page about this flag? Done.
(In reply to M. Tompsett from comment #2) > It should be noted somewhere to remember to run: > $ mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql I overlooked this. This is really important to be highlighted, because timezones would be valid but Koha would fail to connect, on invalid TZ.