Conditions | 3 |
Paths | 3 |
Total Lines | 15 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php |
||
35 | public function get() { |
||
36 | if (!$this->timeZone) { |
||
37 | $net = $this->system->getNetPath(); |
||
38 | if ($net) { |
||
39 | $command = sprintf('%s time zone -S %s', |
||
40 | $net, |
||
41 | escapeshellarg($this->host) |
||
42 | ); |
||
43 | $this->timeZone = exec($command); |
||
44 | } else { // fallback to server timezone |
||
45 | $this->timeZone = date_default_timezone_get(); |
||
46 | } |
||
47 | } |
||
48 | return $this->timeZone; |
||
49 | } |
||
50 | } |
||
51 |