diff --git a/eZ/Publish/Core/FieldType/DateAndTime/Value.php b/eZ/Publish/Core/FieldType/DateAndTime/Value.php index 0174570408..702f8e9941 100644 --- a/eZ/Publish/Core/FieldType/DateAndTime/Value.php +++ b/eZ/Publish/Core/FieldType/DateAndTime/Value.php @@ -66,7 +66,10 @@ public static function fromString($dateString) public static function fromTimestamp($timestamp) { try { - return new static(new DateTime("@{$timestamp}")); + $dateTime = new DateTime(); + $dateTime->setTimestamp($timestamp); + + return new static($dateTime); } catch (Exception $e) { throw new InvalidArgumentValue('$timestamp', $timestamp, __CLASS__, $e); }