I tried to stored date within mongodatabse database, there's difference between the server and local, I got always date - 1 hour within the server. Otherwise, I noticed a strange thing happened within the local, and here's an example :
Get Object from the front contain a date :
console.dir(req.body);
{ title: 'a',
date: '2018-01-20T00:00:28+01:00',
message:'a',
status: 'inDirectly',
active: true }
Create a new record based on moongose schema that contain a date type :
let newCommunication = new Communication(req.body);
Then display the record like this :
console.dir(newCommunication._doc);
and I got :
{ _id:
ObjectID { _bsontype: 'ObjectID', id: Buffer [ 90, 98, 3, 99, 240, 231, 66, 2, 16, 200, 27, 192 ] },
active: true,
status: 'inDirectly',
message: 'a',
date: 2018-01-19T23:00:28.000Z,
title: 'a' }