Operational Defect Database

BugZero found this defect 2397 days ago.

MongoDB | 413006

[SERVER-30524] dateFromParts expects "milliseconds" instead of "millisecond"

Last update date:

10/30/2023

Affected products:

MongoDB Server

Affected releases:

No affected releases provided.

Fixed releases:

3.5.12

Description:

Info

db.foo.aggregate({$project:{milli:{$millisecond:"$date"}}}) { "_id" : ObjectId("5984bd888a8d0117a3bbb81d"), "milli" : 0 } { "_id" : ObjectId("5984bd888a8d0117a3bbb81e"), "milli" : 374 } but db.foo.aggregate({$project:{date:{$dateFromParts:{millisecond:318,year:1970}}}}) assert: command failed: { "ok" : 0, "errmsg" : "Unrecognized argument to $dateFromParts: millisecond", "code" : 40518, "codeName" : "Location40518" } : aggregate failed // but db.foo.aggregate({$project:{date:{$dateFromParts:{milliseconds:318,year:1970}}}}) { "_id" : ObjectId("5984bd888a8d0117a3bbb81b"), "date" : ISODate("1970-01-01T00:00:00.318Z") } And $dateToParts returns: "year" : 1975, "month" : 6, "day" : 12, "hour" : 0, "minute" : 0, "second" : 0, "millisecond" : 0 So I think this milliseconds is a typo.

Top User Comments

xgen-internal-githook commented on Tue, 8 Aug 2017 09:39:55 +0000: Author: {'name': 'Derick Rethans', 'username': 'derickr', 'email': 'github@derickrethans.nl'} Message: SERVER-30524 dateFromParts should expect "millisecond" instead of "milliseconds" Branch: master https://github.com/mongodb/mongo/commit/8962beb1b8f8ca869a9f7ccdc4a7eeab2b84c2f4 derick commented on Sat, 5 Aug 2017 00:03:07 +0000: https://mongodbcr.appspot.com/149560001/

Additional Resources / Links

Share:

BugZero Risk Score

Coming soon

Status

Closed

Have you been affected by this bug?

cost-cta-background

Do you know how much operational outages are costing you?

Understand the cost to your business and how BugZero can help you reduce those costs.

Discussion

Login to read and write comments.

Have you ever...

had your data corrupted from a

VMware

bug?

Search:

...