diff options
Diffstat (limited to 'apps/files_external/3rdparty/icewind/smb/src/TimeZoneProvider.php')
-rw-r--r-- | apps/files_external/3rdparty/icewind/smb/src/TimeZoneProvider.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/files_external/3rdparty/icewind/smb/src/TimeZoneProvider.php b/apps/files_external/3rdparty/icewind/smb/src/TimeZoneProvider.php index fcdf7e3e879..8dce76cb774 100644 --- a/apps/files_external/3rdparty/icewind/smb/src/TimeZoneProvider.php +++ b/apps/files_external/3rdparty/icewind/smb/src/TimeZoneProvider.php @@ -35,13 +35,17 @@ class TimeZoneProvider { public function get() { if (!$this->timeZone) { $net = $this->system->getNetPath(); - if ($net) { + // for local domain names we can assume same timezone + if ($net && strpos($this->host, '.') !== false) { $command = sprintf('%s time zone -S %s', $net, 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(); } } |