DbConnection: Rename getTimezoneOffset() to defaultTimezoneOffset()

refs Icinga/icingaweb2-module-director#1837
This commit is contained in:
Johannes Meyer 2019-04-17 12:28:54 +02:00
parent f72aa291bc
commit 4d0a9fb289
1 changed files with 2 additions and 2 deletions

View File

@ -207,7 +207,7 @@ class DbConnection implements Selectable, Extensible, Updatable, Reducible, Insp
$driverOptions[PDO::MYSQL_ATTR_INIT_COMMAND] .= ', NAMES ' . $adapterParamaters['charset'];
unset($adapterParamaters['charset']);
}
$driverOptions[PDO::MYSQL_ATTR_INIT_COMMAND] .= ', time_zone=\'' . $this->getTimezoneOffset() . '\'';
$driverOptions[PDO::MYSQL_ATTR_INIT_COMMAND] .= ", time_zone='" . $this->defaultTimezoneOffset() . "'";
$driverOptions[PDO::MYSQL_ATTR_INIT_COMMAND] .=';';
$defaultPort = 3306;
break;
@ -295,7 +295,7 @@ class DbConnection implements Selectable, Extensible, Updatable, Reducible, Insp
*
* @return string
*/
public function getTimezoneOffset()
protected function defaultTimezoneOffset()
{
$tz = new DateTimeZone(date_default_timezone_get());
$offset = $tz->getOffset(new DateTime());