ADS : 14.0.1
Platform : Ubuntu 12.04 64 bit
MongoDB : 2.5.3
This is with reference to the new behavior of $min operator on mongodb 2.5.3 as described here.
Steps to reproduce issue:
1) Create a new collection with a single doc using following query:
db.iota.insert({age : 2, manudate : new Date("2013-09-25"), expdate : new Date("2014-09-25")})
2) Now run the following query :
db.iota.update({age : 2}, {$min : {expdate : new Date("2013-10-21")}})
Expected behavior:
3) The expdate value on collection 'iota' should have been updated to "2013-10-21" as it is lesser/earlier than "2014-09-25".
Actual behavior:
4) The expdate values is updated to "1970-01-01". (Pls refer to attached ads_mongoshell.png)
|
|
117 KB
We need to upgrade our MongoShell version to 2.5.3
Ravi, please use a different syntax for Date and see if it works.
db.iota.update({age : 2}, {$min : {expdate : new Date("2013, 9, 21")}})
or
db.iota.update({age : 2}, {$min : {expdate : new Date("Oct 21, 2013")}})
The problem you reported may be related to issue #10601.
Ravi, please use a different syntax for Date and see if it works.
db.iota.update({age : 2}, {$min : {expdate : new Date("2013, 9, 21")}})
or
db.iota.update({age : 2}, {$min : {expdate : new Date("Oct 21, 2013")}})
The problem you reported may be related to issue #10601.
Issue #10602 |
| Closed |
| Duplicate |
| Resolved |
Completion |
| No due date |
| No fixed build |
| No time estimate |
1 issue link |
duplicates #10601
Issue #10601Issue with the insertion of date data via ADS mongoshell |
We need to upgrade our MongoShell version to 2.5.3