In the MongoDB shell on windows, if you run a query with a value
new ISODate('0001-01-01T00:00:00Z')
he is really looking
new ISODate('1901-01-01T00:00:00Z')
If you enter βnew ISODate ('0001-01-01T00: 00: 00Z') directly into Mongo Shell, you will see that this conversion occurs when it returns ISODate (" 1901-01-01T00: 00: 00Z ") .
Oddly enough, when you use the "new date" instead of the "new ISODate" by entering:
new Date('0001-01-01T:00:00:00Z')
it returns an ISODate ("0001-01-01T00: 00: 00Z"), which is correct.
Both should return ISODate in accordance with the documents and, in my opinion, should act the same. Does anyone know why they are not doing this, and is this a bug or function?
source share