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