mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-01 06:28:46 +02:00
N°3234 - Cron rework
* some timezone refactors occurred
This commit is contained in:
@@ -769,19 +769,22 @@ class utils
|
||||
return new Config();
|
||||
}
|
||||
|
||||
public static function InitTimeZone() {
|
||||
$oConfig = self::GetConfig();
|
||||
public static function InitTimeZone($oConfig = null)
|
||||
{
|
||||
if (is_null($oConfig))
|
||||
{
|
||||
$oConfig = self::GetConfig();
|
||||
}
|
||||
$sItopTimeZone = $oConfig->Get('timezone');
|
||||
|
||||
if (!empty($sItopTimeZone))
|
||||
{
|
||||
date_default_timezone_set($sItopTimeZone);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Leave as is... up to the admin to set a value somewhere...
|
||||
// see http://php.net/manual/en/datetime.configuration.php#ini.date.timezone
|
||||
}
|
||||
// else
|
||||
// {
|
||||
// // Leave as is... up to the admin to set a value somewhere...
|
||||
// // see http://php.net/manual/en/datetime.configuration.php#ini.date.timezone
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user