andrewplummer/Sugar — Issue #78: 00:00:00 timestamp formats a day off
Author: wavded
Created: 2011-12-16 19:14:11+00:00
State: open

Formatting dates that have a timestamp of 00:00:00 are going back a day. This is most problematic when working with MongoDB because Dates are stored with a 00:00:00 timestamp. Here is an example that I would expect to print out `1970 01 01` but prints out `1969 12 31` instead.

```js
var date = new Date(0);
console.log(date); // Thu, 01 Jan 1970 00:00:00 GMT
console.log(date.format('{yyyy} {M} {d}')); // 1969 12 31
```