-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed as not planned
Labels
status: feedback-reminderWe've sent a reminder that we need additional information before we can continueWe've sent a reminder that we need additional information before we can continuestatus: waiting-for-feedbackWe need additional information before we can continueWe need additional information before we can continue
Description
When deserialising to a Map or similar flexible type $date fields get deserialised as java.util.date
e.g: something like
mongoTemplate.find(query, Map.class, "myCollection")
will convert:
{"time": {
"$date": "2024-10-18T16:32:51.058Z"
}}
returning a Date for the "time" field.
java.util.Date is an antiquated, broken and difficult to use class. Since timezone ('z') information is specified in the value the natural default conversion would be java.time.Instant. (or possibly a ZonedDateTime but this is possibly less convenient in the majority of cases)
In general all uses of java.util.Date and java.util.Calendar should be removed.
Metadata
Metadata
Assignees
Labels
status: feedback-reminderWe've sent a reminder that we need additional information before we can continueWe've sent a reminder that we need additional information before we can continuestatus: waiting-for-feedbackWe need additional information before we can continueWe need additional information before we can continue