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() {
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)