-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: mongoimport
-
None
All versions of mongoimport were able to parse and import following simple document containing timestamp:
{ "ts" : { "$date" : "2019-07-25T20:25:15.202+0800" } }
Now if I try to import this document using mongoimport version 4.2.0-rc4 it will print this error:
2019-07-26T18:30:06.927+0800 connected to: mongodb://localhost:27017/ 2019-07-26T18:30:06.928+0800 Failed: invalid $date value string: 2019-07-26T18:30:06.928+0800 0 document(s) imported successfully. 0 document(s) failed to import.
The problem is that new mongoimport only accepts date strings with colon in the timezone offset part. So following document will be imported successfully:
{ "ts" : { "$date" : "2019-07-25T20:25:15.202+08:00" } }
I believe this is a regression in mongoimport functionality comparing to previous versions.