notification_date: {
type: Date,
default: Date.now()
},
我也尝试过 new Date() 但它对我没有帮助。
最佳答案
工作正常
notification_date: {
type: Date,
default: Date.now,
},
关于node.js - Node JS : Date. not() 采用服务器启动时间而不是 Mongoose 中的当前时间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46952463/