开发者

How can I put the current timestamp in a Mongoose Schema?

开发者 https://www.devze.com 2023-04-05 23:58 出处:网络
As per the docs, I can do this for a date: new Sch开发者_运维知识库ema({ date: { type: Date, default: Date.now }

As per the docs, I can do this for a date:

new Sch开发者_运维知识库ema({
    date: { type: Date, default: Date.now }
})

But what if I need time?


Looks like that does timestamps too!

0

精彩评论

暂无评论...
验证码 换一张
取 消