Skip to content

Commit

Permalink
(fix) default timezone for export
Browse files Browse the repository at this point in the history
Signed-off-by: Andrii Ilkiv <[email protected]>
  • Loading branch information
AIlkiv committed Nov 5, 2024
1 parent 1bd6ef3 commit 0582821
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Service/SubmissionService.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
use OCA\Forms\Db\QuestionMapper;
use OCA\Forms\Db\SubmissionMapper;
use OCA\Forms\Db\UploadedFileMapper;
use OCA\DAV\CalDAV\TimezoneService;
use OCP\AppFramework\Db\DoesNotExistException;
use OCP\AppFramework\OCS\OCSException;
use OCP\Files\File;
Expand Down Expand Up @@ -75,6 +76,7 @@ public function __construct(
private ITempManager $tempManager,
private FormsService $formsService,
private IUrlGenerator $urlGenerator,
private TimezoneService $timezoneService,

Check failure on line 79 in lib/Service/SubmissionService.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis dev-stable30

UndefinedClass

lib/Service/SubmissionService.php:79:3: UndefinedClass: Class, interface or enum named OCA\DAV\CalDAV\TimezoneService does not exist (see https://psalm.dev/019)
) {
$this->currentUser = $userSession->getUser();
}
Expand Down Expand Up @@ -207,7 +209,7 @@ public function getSubmissionsData(Form $form, string $fileFormat, ?File $file =
$submissionEntities = array_reverse($submissionEntities);

$questions = $this->questionMapper->findByForm($form->getId());
$defaultTimeZone = date_default_timezone_get();
$defaultTimeZone = $this->timezoneService->getDefaultTimezone();

Check failure on line 212 in lib/Service/SubmissionService.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis dev-stable30

UndefinedClass

lib/Service/SubmissionService.php:212:22: UndefinedClass: Class, interface or enum named OCA\DAV\CalDAV\TimezoneService does not exist (see https://psalm.dev/019)

if (!$this->currentUser) {
$userTimezone = $this->config->getUserValue($form->getOwnerId(), 'core', 'timezone', $defaultTimeZone);
Expand Down

0 comments on commit 0582821

Please sign in to comment.