]> source.dussan.org Git - nextcloud-server.git/commitdiff
improved fallback of timezone detection
authorRobin Appelman <robin@icewind.nl>
Wed, 22 Aug 2018 12:22:52 +0000 (14:22 +0200)
committerRobin Appelman <robin@icewind.nl>
Thu, 23 Aug 2018 14:09:33 +0000 (16:09 +0200)
Signed-off-by: Robin Appelman <robin@icewind.nl>
apps/files_external/3rdparty/icewind/smb/src/TimeZoneProvider.php

index fcdf7e3e879b59559a9a8a1b516ae214a2ad08f3..4438ee5bf7cae1fa26ddadcc780ea6690804fe75 100644 (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();
                        }
                }