I’d like to insert an UTC Date (ISO 8601 Format) field using the ISODate Type into MongoDB.
According to MongoDB Date Documentation ISODates are stored as UTC Date/Tiem of the BSONSpec. This is \x09 according to this spec.
bson-erlang seems to implement this somehow.
Will research this now.
Specify the field in erlang’s timestamp format ({MegaSecs, Secs, MicroSecs}) and bson-erlang should take care of it.
So e.g.:
Doc = {timestamp, {0, 1000, 100}}