We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3922c71 commit 64bac60Copy full SHA for 64bac60
eZ/Publish/Core/FieldType/DateAndTime/Value.php
@@ -66,7 +66,10 @@ public static function fromString($dateString)
66
public static function fromTimestamp($timestamp)
67
{
68
try {
69
- return new static(new DateTime("@{$timestamp}"));
+ $dateTime = new DateTime();
70
+ $dateTime->setTimestamp($timestamp);
71
+
72
+ return new static($dateTime);
73
} catch (Exception $e) {
74
throw new InvalidArgumentValue('$timestamp', $timestamp, __CLASS__, $e);
75
}
0 commit comments