When I do a new Date() in an insert in Mongodb shell it gets added as shown below with an ISODate wrapper.
ISODate("2017-12-06T12:56:01.908Z")
But when I format a date as an ISO using joda-time and add it via monger(Clojure Mongo Driver) it gets added as
2017-12-06T12:32:00.852Z
The ISO format is correct , but there is no ISODate wrapper around it and mongo for some reason do not respect it. Mongo TTLs do not work in the second case.
How do I add an ISODate wrapper to date in clojure or using monger?
Thank you