fix export dates are not localized (#5368)

This commit is contained in:
Kevin Papst
2025-02-20 15:07:28 +01:00
committed by GitHub
parent 928b5208e9
commit afaa845a9a
3 changed files with 7 additions and 7 deletions

View File

@@ -80,7 +80,6 @@ class Invoice implements EntityWithMetaFields
#[Assert\NotNull]
#[Serializer\Expose]
#[Serializer\Groups(['Default'])]
#[Exporter\Expose(label: 'date', type: 'datetime')]
private ?\DateTime $createdAt = null;
#[ORM\Column(name: 'timezone', type: 'string', length: 64, nullable: false)]
private ?string $timezone = null;
@@ -176,6 +175,7 @@ class Invoice implements EntityWithMetaFields
return $this->total;
}
#[Exporter\Expose(name: 'createdAt', label: 'date', type: 'datetime')]
public function getCreatedAt(): ?\DateTime
{
if (!$this->localized) {