CRM-19115 - Synchronize PHP=>MySQL active timezone for all backend scripts
authorTim Otten <totten@civicrm.org>
Tue, 4 Dec 2018 06:35:50 +0000 (22:35 -0800)
committerTim Otten <totten@civicrm.org>
Tue, 4 Dec 2018 06:35:50 +0000 (22:35 -0800)
CRM/Utils/System.php

index ab86071241928444b90fa47a7269b7f1447cc6c6..b335c0197740cdeae9475b4d4793ff5736602a1f 100644 (file)
@@ -1474,7 +1474,11 @@ class CRM_Utils_System {
       $params = array();
     }
     $config = CRM_Core_Config::singleton();
-    return $config->userSystem->loadBootStrap($params, $loadUser, $throwError, $realPath);
+    $result = $config->userSystem->loadBootStrap($params, $loadUser, $throwError, $realPath);
+    if (is_callable([$config->userSystem, 'setMySQLTimeZone'])) {
+      $config->userSystem->setMySQLTimeZone();
+    }
+    return $result;
   }
 
   /**