Skip to content

Commit

Permalink
assume local timezone for local hostnames
Browse files Browse the repository at this point in the history
  • Loading branch information
icewind1991 committed Feb 6, 2019
1 parent 4d0e89e commit 3cf60dc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/TimeZoneProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ public function __construct($host, System $system) {
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)
Expand Down

0 comments on commit 3cf60dc

Please sign in to comment.