assume local timezone for local hostnames

This commit is contained in:
Robin Appelman 2018-08-24 15:12:43 +02:00
commit c6f723d20f

View file

@ -35,7 +35,8 @@ class TimeZoneProvider {
public function get() { public function get() {
if (!$this->timeZone) { if (!$this->timeZone) {
$net = $this->system->getNetPath(); $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', $command = sprintf('%s time zone -S %s',
$net, $net,
escapeshellarg($this->host) escapeshellarg($this->host)