In my Mongoose schema I'm using Date.now to insert a user based on creation time. For some strange reason (unknown to me), the time is one hour behind. I'm thinking it's because I'm (GMT+1) but and my Express/Node/Mongo setup must be standard GMT time, or maybe not. Has anyone come across this before?
User = new Schema({
fullName: {
type: String,
required: true
},
password: {
type: String,
required: true
},
emailAddress: {
type: String,
unique: true,
required: [true, 'Email address is required.']
},
uniqueURL: {
type: String,
required: true,
unique: true
},
created: {
type: Date,
default: Date.now
}
});