Mongoose日期查询在heroku生产中无法正常工作

时间:2018-04-16 05:04:37

标签: node.js mongodb express heroku mongoose

我有以下查询在我的本地完全正常,但在生产(现场),我没有得到预期的结果。

var startDay = new Date();
start.setHours(0, 0, 0, 0);
var endDay = new Date();
end.setHours(23, 59, 59, 999);

CheckBill.find({
        status: true,
        nextDueDate: {
            "$gte": startDay,
            "$lt": endDay
        }
    })
    .populate('customer')
    .then(function(docs) {
        console.log(docs)
    })
    .catch(function(err) {
        console.log(err);
    });

请帮忙

0 个答案:

没有答案
相关问题