Skip to content

Commit 641c98c

Browse files
Merge pull request WWBN#9893 from manu0401/timezone
Portable timezone read
2 parents 2760395 + f88b21c commit 641c98c

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

objects/functions.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5851,15 +5851,7 @@ function getSystemTimezone()
58515851
return $_getSystemTimezoneName;
58525852
}
58535853

5854-
if (isWindowsServer()) {
5855-
$cmd = 'tzutil /g';
5856-
} else {
5857-
$cmd = 'cat /etc/timezone';
5858-
}
5859-
5860-
$_getDatabaseTimezoneName = trim(preg_replace('/[^a-z0-9_ \/-]+/si', '', shell_exec($cmd)));
5861-
5862-
$_getDatabaseTimezoneName = fixTimezone($_getDatabaseTimezoneName);
5854+
$_getDatabaseTimezoneName = fixTimezone(date('e'));
58635855

58645856
return $_getDatabaseTimezoneName;
58655857
}

0 commit comments

Comments
 (0)