In MongoDB Shell on windows if you run a query with a value of
new ISODate('0001-01-01T00:00:00Z')
it actually seems to search for
new ISODate('1901-01-01T00:00:00Z')
If you enter "new ISODate('0001-01-01T00:00:00Z')" directly in the Mongo Shell you can see this conversion taking place as it returns ISODate("1901-01-01T00:00:00Z").
Oddly, when you use "new Date" instead of "new ISODate" by entering:
new Date('0001-01-01T:00:00:00Z')
it returns ISODate("0001-01-01T00:00:00Z") which is correct.
Both are supposed to return an ISODate according to the docs and to my mind should act identically. Does anyone know why they don't and whether it's a bug or a feature?