set timezone for smbclient and parser to UTC

This commit is contained in:
Robin Appelman 2022-05-30 17:18:19 +02:00
commit 76995aa11c
3 changed files with 4 additions and 3 deletions

View file

@ -75,7 +75,8 @@ class RawConnection {
'CLI_NO_READLINE' => 1, // Not all distros build smbclient with readline, disable it to get consistent behaviour
'LC_ALL' => Server::LOCALE,
'LANG' => Server::LOCALE,
'COLUMNS' => 8192 // prevent smbclient from line-wrapping it's output
'COLUMNS' => 8192, // prevent smbclient from line-wrapping it's output
'TZ' => 'UTC',
]);
$this->process = proc_open($this->command, $descriptorSpec, $this->pipes, '/', $env);
if (!$this->isValid()) {

View file

@ -66,7 +66,7 @@ class Server extends AbstractServer {
throw new ConnectionException((string)$connection->readLine());
}
$parser = new Parser($this->timezoneProvider->get($this->host));
$parser = new Parser('UTC');
$output = $connection->readAll();
if (isset($output[0])) {

View file

@ -73,7 +73,7 @@ class Share extends AbstractShare {
$this->server = $server;
$this->name = $name;
$this->system = $system;
$this->parser = new Parser($server->getTimeZone());
$this->parser = new Parser('UTC');
}
private function getAuthFileArgument(): string {