日付の保存形式が1.6.5と1.8.2で異なる件
(1.8.2)
> db.Entry.findOne(); { "_id" : ObjectId("4e00346a7497f65075176b51"), "entryId" : NumberLong(3810), "userId" : NumberLong(86), "entryText" : "aaa", "registDate" : ISODate("2011-06-21T06:04:26.479Z"), "editDate" : ISODate("2011-06-21T06:04:26.479Z"), "deleteFlag" : 0, }
(1.6.5)
> db.Entry.findOne(); { "_id" : ObjectId("4d64de198f0d977486b6f448"), "entryId" : NumberLong(56), "userId" : NumberLong(1), "entryText" : "あれ?", "registDate" : "Wed Feb 23 2011 19:14:49 GMT+0900 (JST)", "editDate" : "Wed Feb 23 2011 19:14:49 GMT+0900 (JST)", "deleteFlag" : 0, }
1.8.2ではISO 8601形式でUTCの時間(言葉の使い方あってんのかこれ、、、)が保持される。
これ、javaのアプリから
Entry entry = new Entry(); entry.setRegistDate(new Date());
みたいな形でデータをstoreしてます。