when a json is json.stringify and parse back to json later, the date
is different:

var  d = {"id":1, "d":new Date()}
//{ id: 1, d: Tue, 20 Mar 2012 23:55:10 GMT }

 s = JSON.stringify(d)
//'{"id":1,"d":"2012-03-20T23:55:10.352Z"}'

b = JSON.parse(s)
//{ id: 1, d: '2012-03-20T23:55:10.352Z' }




On Mar 21, 1:08 am, mscdex <msc...@gmail.com> wrote:
> On Mar 20, 10:20 am, Dale Tan <wtd...@gmail.com> wrote:
>
> > var date = +new Date()
> > // save it in redis
>
> or `Date.now()` :-)

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to