I'm running node 0.6.14 on a Joyent machine (OS is a varient of Solaris). The timezone is set to US/Central, but the Date object in node doesn't seem to recognize this. Below are the outputs of a few different console.logs:
Hmm, European CST is GMT+1, it could be using that instead (in spite of the US/ bit there). Try changing to (for example) 'America/Chicago' and see if you get different results?
> I'm running node 0.6.14 on a Joyent machine (OS is a varient of Solaris). The timezone is set to US/Central, but the Date object in node doesn't seem to recognize this. Below are the outputs of a few different console.logs:
> process.env.TZ: 'US/Central'
> new Date(): 'Mon, 09 Apr 2012 04:45:28 GMT'
> new Date().toLocaleString(): 'Mon Apr 09 2012 05:45:28 GMT+0100 (CST)'
> The current US/Central time is actually 'Sun Apr 08 2012 23:45:28 GMT -0500 (CDT)'. Is this a bug or am I doing something wrong?
On Monday, April 9, 2012 12:07:45 AM UTC-5, Matt wrote:
> Hmm, European CST is GMT+1, it could be using that instead (in spite of > the US/ bit there). Try changing to (for example) 'America/Chicago' and see > if you get different results?
> -Matt
> On Apr 9, 2012, at 12:49 AM, james33 wrote:
> I'm running node 0.6.14 on a Joyent machine (OS is a varient of Solaris). > The timezone is set to US/Central, but the Date object in node doesn't seem > to recognize this. Below are the outputs of a few different console.logs:
> On Monday, April 9, 2012 12:07:45 AM UTC-5, Matt wrote: > Hmm, European CST is GMT+1, it could be using that instead (in spite of the US/ bit there). Try changing to (for example) 'America/Chicago' and see if you get different results?
> -Matt
> On Apr 9, 2012, at 12:49 AM, james33 wrote:
>> I'm running node 0.6.14 on a Joyent machine (OS is a varient of Solaris). The timezone is set to US/Central, but the Date object in node doesn't seem to recognize this. Below are the outputs of a few different console.logs:
>> process.env.TZ: 'US/Central'
>> new Date(): 'Mon, 09 Apr 2012 04:45:28 GMT'
>> new Date().toLocaleString(): 'Mon Apr 09 2012 05:45:28 GMT+0100 (CST)'
>> The current US/Central time is actually 'Sun Apr 08 2012 23:45:28 GMT -0500 (CDT)'. Is this a bug or am I doing something wrong?
On Monday, April 9, 2012 1:08:03 PM UTC-5, Matt wrote:
> And what if you pick a completely different timezone, e.g., > America/Los_Angeles?
> -Matt
> Sent from my iPhone
> On Apr 9, 2012, at 1:56 PM, james33 <jame...@gmail.com> wrote:
> I still get the same result.
> On Monday, April 9, 2012 12:07:45 AM UTC-5, Matt wrote:
>> Hmm, European CST is GMT+1, it could be using that instead (in spite of >> the US/ bit there). Try changing to (for example) 'America/Chicago' and see >> if you get different results?
>> -Matt
>> On Apr 9, 2012, at 12:49 AM, james33 wrote:
>> I'm running node 0.6.14 on a Joyent machine (OS is a varient of Solaris). >> The timezone is set to US/Central, but the Date object in node doesn't seem >> to recognize this. Below are the outputs of a few different console.logs:
Should print out a locale string at GMT-0700 (PDT). If it doesn't, then I'd defer to someone else who's more knowledgeable about the internals of Node's Date object than myself. :)
> On Monday, April 9, 2012 1:08:03 PM UTC-5, Matt wrote: > And what if you pick a completely different timezone, e.g., America/Los_Angeles?
> -Matt
> Sent from my iPhone
> On Apr 9, 2012, at 1:56 PM, james33 <jame...@gmail.com> wrote:
>> I still get the same result.
>> On Monday, April 9, 2012 12:07:45 AM UTC-5, Matt wrote: >> Hmm, European CST is GMT+1, it could be using that instead (in spite of the US/ bit there). Try changing to (for example) 'America/Chicago' and see if you get different results?
>> -Matt
>> On Apr 9, 2012, at 12:49 AM, james33 wrote:
>>> I'm running node 0.6.14 on a Joyent machine (OS is a varient of Solaris). The timezone is set to US/Central, but the Date object in node doesn't seem to recognize this. Below are the outputs of a few different console.logs:
>>> process.env.TZ: 'US/Central'
>>> new Date(): 'Mon, 09 Apr 2012 04:45:28 GMT'
>>> new Date().toLocaleString(): 'Mon Apr 09 2012 05:45:28 GMT+0100 (CST)'
>>> The current US/Central time is actually 'Sun Apr 08 2012 23:45:28 GMT -0500 (CDT)'. Is this a bug or am I doing something wrong?
> Should print out a locale string at GMT-0700 (PDT). If it doesn't, then > I'd defer to someone else who's more knowledgeable about the internals of > Node's Date object than myself. :)
> -Matt
> On Apr 9, 2012, at 2:32 PM, james33 wrote:
> I get GMT+0100 (PST) with that.
> On Monday, April 9, 2012 1:08:03 PM UTC-5, Matt wrote:
>> And what if you pick a completely different timezone, e.g., >> America/Los_Angeles?
>> -Matt
>> Sent from my iPhone
>> On Apr 9, 2012, at 1:56 PM, james33 <jame...@gmail.com> wrote:
>> I still get the same result.
>> On Monday, April 9, 2012 12:07:45 AM UTC-5, Matt wrote:
>>> Hmm, European CST is GMT+1, it could be using that instead (in spite of >>> the US/ bit there). Try changing to (for example) 'America/Chicago' and see >>> if you get different results?
>>> -Matt
>>> On Apr 9, 2012, at 12:49 AM, james33 wrote:
>>> I'm running node 0.6.14 on a Joyent machine (OS is a varient of >>> Solaris). The timezone is set to US/Central, but the Date object in node >>> doesn't seem to recognize this. Below are the outputs of a few different >>> console.logs: