We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 681e591 commit bf2c204Copy full SHA for bf2c204
module/Core/src/Repository/DoctrineMongoODM/Types/TimezoneAwareDate.php
@@ -117,12 +117,13 @@ public function closureToPhp(): string
117
/* CODE FROM: ' . __METHOD__ . ' */
118
if (!is_array($value)
119
|| !isset($value["date"])
120
- || !$value["date"] instanceOf UTCDateTime
+ || is_null($value["date"])
121
|| !isset($value["tz"])
122
) {
123
$return = null;
124
} else {
125
- $date = new \DateTime("@".$value["date"]->sec);
+ //$date = new \DateTime($value["date"]);
126
+ $date = $value["date"]->toDateTime();
127
$date->setTimezone(new \DateTimeZone($value["tz"]));
128
$return = $date;
129
}
0 commit comments