> new Date().toJSON() = "2013-11-21T03:58:17.178Z"
>new Date() = Wed Nov 20 2013 19:58:20 GMT-0800 (PST)
Why changing the representation changes the date format?
> new Date().toJSON() = "2013-11-21T03:58:17.178Z"
>new Date() = Wed Nov 20 2013 19:58:20 GMT-0800 (PST)
Why changing the representation changes the date format?
JSON dates have the same format as the ISO-8601 standard, which is by default expressed in UTC (Coordinated Universal Time), and Date() is expressed as your local time.