зеркало из https://github.com/nextcloud/forms.git
Merge pull request #2397 from AIlkiv/default-timezone-for-export-date
(fix) default timezone for export
This commit is contained in:
Коммит
39bd5df043
|
@ -207,7 +207,7 @@ class SubmissionService {
|
||||||
$submissionEntities = array_reverse($submissionEntities);
|
$submissionEntities = array_reverse($submissionEntities);
|
||||||
|
|
||||||
$questions = $this->questionMapper->findByForm($form->getId());
|
$questions = $this->questionMapper->findByForm($form->getId());
|
||||||
$defaultTimeZone = date_default_timezone_get();
|
$defaultTimeZone = $this->config->getSystemValueString('default_timezone', 'UTC');
|
||||||
|
|
||||||
if (!$this->currentUser) {
|
if (!$this->currentUser) {
|
||||||
$userTimezone = $this->config->getUserValue($form->getOwnerId(), 'core', 'timezone', $defaultTimeZone);
|
$userTimezone = $this->config->getUserValue($form->getOwnerId(), 'core', 'timezone', $defaultTimeZone);
|
||||||
|
|
|
@ -579,7 +579,11 @@ file2.txt"
|
||||||
return $questionEntities;
|
return $questionEntities;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
date_default_timezone_set('Europe/Berlin');
|
$this->config->expects($this->once())
|
||||||
|
->method('getSystemValueString')
|
||||||
|
->with('default_timezone', 'UTC')
|
||||||
|
->willReturn('Europe/Berlin');
|
||||||
|
|
||||||
$this->config->expects($this->once())
|
$this->config->expects($this->once())
|
||||||
->method('getUserValue')
|
->method('getUserValue')
|
||||||
->with('currentUser', 'core', 'timezone', 'Europe/Berlin')
|
->with('currentUser', 'core', 'timezone', 'Europe/Berlin')
|
||||||
|
|
Загрузка…
Ссылка в новой задаче