When running the query in the mongo shell, the query returns the proper result:
mongo localhost:27017/development
> db.statistics.find({'type': 'Hourly', 'statistics_date' : {'$lt': new Date(1307145600000)}}).count();
21316
However, when performing the query via eval, the query always returns 0 results.
mongo localhost:27017/development --eval "db.statistics.find({'type': 'Hourly', 'statistics_date' : {'$lt': new Date(1307145600000)}}).count();"
MongoDB shell version: 1.8.1
connecting to: localhost:27017/development
0