blob: 22406a4f9566a43f7f361b00e253f62c7218e8ff (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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;
}
}
|