Bug 20123: (QA follow-up) If tz is 'local', no need to tell database to set the timezone
authorKyle M Hall <kyle@bywatersolutions.com>
Tue, 27 Feb 2018 12:10:59 +0000 (12:10 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 11 Apr 2018 18:05:01 +0000 (15:05 -0300)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Koha/Database.pm

index 802bdc5..c92056c 100644 (file)
@@ -71,6 +71,7 @@ sub _new_schema {
 
     my ( %encoding_attr, $encoding_query, $tz_query, $sql_mode_query );
     my $tz = C4::Context->timezone;
+    $tz = q{} if ( $tz eq 'local' );
     if ( $db_driver eq 'mysql' ) {
         %encoding_attr = ( mysql_enable_utf8 => 1 );
         $encoding_query = "set NAMES 'utf8mb4'";