[SERVER-11193] Passing $currentDate : { date : false } still updates the field to current date Created: 15/Oct/13  Updated: 06/Mar/14  Resolved: 07/Nov/13

Status: Closed
Project: Core Server
Component/s: Write Ops
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Amalia Hawkins Assignee: Scott Hernandez (Inactive)
Resolution: Done Votes: 0
Labels: 26qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Operating System: ALL
Participants:

 Description   

{ "_id" : ObjectId("525847b17bb5149dea3bb079"), "n" : 5 }
> db.foo.update({ n : 5 }, {$currentDate: {date : false }})
{ "_id" : ObjectId("525847b17bb5149dea3bb079"), "n" : 5, "date" : ISODate("2013-10-15T17:35:11.465Z") }

Behavior is not intuitive as I expect date field not to be set in this case.



 Comments   
Comment by Scott Hernandez (Inactive) [ 15/Oct/13 ]

This is how it is designed and matches the behavior of $unset:false, so it has that consistency.

Generated at Thu Feb 08 03:25:09 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.