Skip to content

Commit

Permalink
Make timestamp in csv export ISO 8601 compliant
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Hartmann <chris-hartmann@gmx.de>
  • Loading branch information
Chartman123 committed Feb 21, 2023
1 parent 3181423 commit 6b6dd19
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Service/SubmissionService.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,8 @@ public function getSubmissionsCsv(string $hash): array {
}

// Date
$row[] = $this->dateTimeFormatter->formatDateTime($submission->getTimestamp(), 'full', 'full', new DateTimeZone($userTimezone), $this->l10n);
//$row[] = $this->dateTimeFormatter->format($submission->getTimestamp(), 'datetime', 'Y-m-d\TH:i:s.u\Z', new DateTimeZone($userTimezone), $this->l10n);
$row[] = date_format(date_timestamp_set(new DateTime(), $submission->getTimestamp())->setTimezone(new DateTimeZone($userTimezone)), 'c');

// Answers, make sure we keep the question order
$answers = array_reduce($this->answerMapper->findBySubmission($submission->getId()), function (array $carry, Answer $answer) {
Expand Down

0 comments on commit 6b6dd19

Please sign in to comment.