From 6d268fe64eb01cfedff7074902059a181f70931c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my?= Date: Mon, 16 Mar 2020 11:34:38 +0100 Subject: [PATCH] Correctly map creation and modification dates in collections #57 --- lib/Core/Mapper/DomainObjectMapper.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/Core/Mapper/DomainObjectMapper.php b/lib/Core/Mapper/DomainObjectMapper.php index 91efc9c0..2d7ec7c3 100644 --- a/lib/Core/Mapper/DomainObjectMapper.php +++ b/lib/Core/Mapper/DomainObjectMapper.php @@ -128,9 +128,6 @@ private function getUser($userId) private function getDateTime(int $timestamp): DateTimeInterface { - $date = new DateTimeImmutable(); - $date->setTimestamp($timestamp); - - return $date; + return DateTimeImmutable::createFromFormat('U', (string) $timestamp); } }