Actually the first option is pretty fast even with huge data. Here is an example query using the mongo console:
/usr/bin/mongo yourdbname --eval "db.yourcollectionname.find().forEach(function(doc){doc.yourdatefield = new ISODate(doc.yourdatefield);db.yourcollectionname.save(doc)});"
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…