From 50463e2d13acdeaf6bb2fd9973c597ae40642dbb Mon Sep 17 00:00:00 2001
From: Robin Appelman <robin@icewind.nl>
Date: Wed, 22 Aug 2018 14:22:52 +0200
Subject: [PATCH] improved fallback of timezone detection

Signed-off-by: Robin Appelman <robin@icewind.nl>
---
 .../3rdparty/icewind/smb/src/TimeZoneProvider.php            | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/apps/files_external/3rdparty/icewind/smb/src/TimeZoneProvider.php b/apps/files_external/3rdparty/icewind/smb/src/TimeZoneProvider.php
index fcdf7e3e879..4438ee5bf7c 100644
--- a/apps/files_external/3rdparty/icewind/smb/src/TimeZoneProvider.php
+++ b/apps/files_external/3rdparty/icewind/smb/src/TimeZoneProvider.php
@@ -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();
 			}
 		}
-- 
GitLab