I want to save UTC date at mongodb
after executing an API.
For example, the code below at mongoose makes UTC date automatically with default option. and The saving result is '2019-05-05 02:06:03.797Z'.
createdAt: {
type: Date,
default: Date.now,
},
And the mongoose schema has a variable as the type of Date.
And I want to put the date like 'default:Date.now'
for saving UTC after executing an API with same format.
recentAccess: Date,
Could you help me some advice?