I am using Mongoose & Node.js for my webserver.
As a part of one of my document schemas, I have a \'timestamp\' field. The line for it in the schema is:
when you set mongoose type as "Date" , mongoose convert timestamp to UTC, because timestamp is a number, not a Date. then if you want to store timestamp, you should set mongoose type as "Number".
myfield{ type: Number, default: Date.now() }