improved fallback of timezone detection

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2018-08-22 14:22:52 +02:00
parent c1389070fa
commit 50463e2d13
1 changed files with 4 additions and 1 deletions

View File

@ -41,7 +41,10 @@ class TimeZoneProvider {
escapeshellarg($this->host) escapeshellarg($this->host)
); );
$this->timeZone = exec($command); $this->timeZone = exec($command);
} else { // fallback to server timezone }
if ($this->timeZone) {
// fallback to server timezone
$this->timeZone = date_default_timezone_get(); $this->timeZone = date_default_timezone_get();
} }
} }