As the following code shows, different date may course the Node.js using
different locale to format the Date type.
> a = new Date('1990-1-1')
Mon Jan 01 1990 00:00:00 GMT+0800 (CST)
> a = new Date('1989-1-1')
Sun Jan 01 1989 00:00:00 GMT+0800 (CST)
> a = new Date('1989-5-4')
Thu May 04 1989 00:00:00 GMT+0900 (CST)
> a = new Date('1989-5-5')
Fri May 05 1989 00:00:00 GMT+0900 (CST)
> a.toLocaleTimeString()
'00:00:00'
> a.getTimezoneOffset()
-540
>
My default timezone is ''Asia/Shanghao"(China Standard Time GMT+8). Some dates
like 5/4/1989 may course the Node using another locale to display.
Does anyone know the reason?
r.s
--
--
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
---
You received this message because you are subscribed to the Google Groups
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.