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 48f39628d0
commit 05131490a7
1 changed files with 4 additions and 1 deletions

View File

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