mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 07:44:04 +02:00
DbConnection: Rename getTimezoneOffset() to defaultTimezoneOffset()
refs Icinga/icingaweb2-module-director#1837
This commit is contained in:
parent
f72aa291bc
commit
4d0a9fb289
@ -207,7 +207,7 @@ class DbConnection implements Selectable, Extensible, Updatable, Reducible, Insp
|
|||||||
$driverOptions[PDO::MYSQL_ATTR_INIT_COMMAND] .= ', NAMES ' . $adapterParamaters['charset'];
|
$driverOptions[PDO::MYSQL_ATTR_INIT_COMMAND] .= ', NAMES ' . $adapterParamaters['charset'];
|
||||||
unset($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] .=';';
|
$driverOptions[PDO::MYSQL_ATTR_INIT_COMMAND] .=';';
|
||||||
$defaultPort = 3306;
|
$defaultPort = 3306;
|
||||||
break;
|
break;
|
||||||
@ -295,7 +295,7 @@ class DbConnection implements Selectable, Extensible, Updatable, Reducible, Insp
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getTimezoneOffset()
|
protected function defaultTimezoneOffset()
|
||||||
{
|
{
|
||||||
$tz = new DateTimeZone(date_default_timezone_get());
|
$tz = new DateTimeZone(date_default_timezone_get());
|
||||||
$offset = $tz->getOffset(new DateTime());
|
$offset = $tz->getOffset(new DateTime());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user