LearnBoost/mongoose — Issue #657: Dates and Mongoose
Author: wavded
Created: 2011-12-19 15:50:27+00:00
State: open

I am running into an interesting issue. I initially started diving into it here:

https://github.com/andrewplummer/Sugar/issues/78

But found out the vanilla JS produces the same issue. Whenever I store a date (no timestamp) and then I go to retrieve that date and format it, its a day behind. There is a simple example in the case, I can get you more info if you need. I'm central time. Here is a snippet of a stored doc in MongoDB that will be a date behind when I format it (e.g. getDate()).

```json
{ "_id" : ObjectId("4eeb6c1822501a661600003b"),
"dateExample" : ISODate("2011-12-19T00:00:00Z")
}
```

Does mongoose store UTC dates to MongoDB or is there some other reason why this would be?