correct, thanks.

On Jun 9, 1:25 pm, Ryan Schmidt <google-2...@ryandesign.com> wrote:
> On Jun 9, 2012, at 00:19, Angelo Chen wrote:
>
>
>
>
>
>
>
>
>
> > In a centos server, I tried this, and get 7:
>
> > node
> >> d1 = new Date("Fri, 08 Jun 2012 00:00:00 GMT")
> > Fri, 08 Jun 2012 00:00:00 GMT
> >> d1.getDate()
> > 7
>
> > in my local Lion OS X, I tried this, and get 8, why:
> > node
> >> d1 = new Date("Fri, 08 Jun 2012 00:00:00 GMT")
> > Fri, 08 Jun 2012 00:00:00 GMT
> >> d1.getDate()
> > 8
>
> > why?
>
> You're specifying the time in GMT, but then asking to get the date back in 
> the local timezone. Presumably the two computers are set to different 
> timezones. Perhaps you want to use d1.getUTCDate() instead.

-- 
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