Storing time using default in mongoose schema , saves the same time again and again

后端 未结 0 999
南笙
南笙 2020-11-30 16:53

I have a mongoose schema which includes:

dateTime: {
    type: Date,
    default: moment().tz("Asia/Karachi").format(),
},

But when

相关标签:
回答
  • 消灭零回复
提交回复
热议问题