N°3234 - Cron rework

* some timezone refactors occurred
This commit is contained in:
Eric
2020-08-25 11:20:17 +02:00
parent e8eb6d0e31
commit 761c2a46a3
9 changed files with 314 additions and 378 deletions

View File

@@ -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
// }
}
/**