Add support for interrogating /etc/timezone.
This commit is contained in:
parent
4b891e1a45
commit
44ba14dc7d
1 changed files with 2 additions and 0 deletions
|
|
@ -359,6 +359,8 @@ class ⌬
|
|||
$environmentService = $this->getContainer()->get(Services\EnvironmentService::class);
|
||||
if ($environmentService->isSet('TIMEZONE')) {
|
||||
date_default_timezone_set($environmentService->get('TIMEZONE'));
|
||||
} elseif (file_exists("/etc/timezone")) {
|
||||
date_default_timezone_set(trim(file_get_contents("/etc/timezone")));
|
||||
} else {
|
||||
date_default_timezone_set(self::DEFAULT_TIMEZONE);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue