parent
c546f0bf46
commit
3159af1983
@ -1,2 +1,3 @@ |
||||
.idea |
||||
vendor |
||||
composer.lock |
||||
|
@ -0,0 +1,35 @@ |
||||
<?php |
||||
/** |
||||
* Copyright (c) 2015 Robin Appelman <icewind@owncloud.com> |
||||
* This file is licensed under the Licensed under the MIT license: |
||||
* http://opensource.org/licenses/MIT |
||||
*/ |
||||
|
||||
namespace Icewind\SMB; |
||||
|
||||
class TimeZoneProvider { |
||||
/** |
||||
* @var string |
||||
*/ |
||||
private $host; |
||||
|
||||
/** |
||||
* @var string |
||||
*/ |
||||
private $timeZone; |
||||
|
||||
/** |
||||
* @param string $host |
||||
*/ |
||||
function __construct($host) { |
||||
$this->host = $host; |
||||
} |
||||
|
||||
public function get() { |
||||
if (!$this->timeZone) { |
||||
$command = 'net time zone -S ' . escapeshellarg($this->host); |
||||
$this->timeZone = exec($command); |
||||
} |
||||
return $this->timeZone; |
||||
} |
||||
} |
Loading…
Reference in new issue