Skip to content

Commit

Permalink
fix: publication date format that also works for documents (#203)
Browse files Browse the repository at this point in the history
* fix: publication date format that also works for documents

* style: formatting

---------

Co-authored-by: Thessa Kockelkorn <thessa@notfound.nl>
Co-authored-by: Rene <rene@64k.nl>
  • Loading branch information
3 people committed Feb 9, 2024
1 parent 6164568 commit 2f6d8bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Services/Indexer/SearchItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ private function toDateString(?DateTime $date): ?string
if ($date === null) {
return null;
}
$date->setTimezone(new \DateTimeZone('UTC'));

return $date->format(DateTime::ATOM);
return $date->format('Y-m-d\TH:i:s.u\Z');
}
}

0 comments on commit 2f6d8bd

Please sign in to comment.