Ciao!
How are you?
Chrome:
new Date()

The server:
date

With node it shows wrong time (GMT):

It should show 11 hour but shows 10 hour.
How can we fix? Our taxing is makes wrong and is a huge problems for us.
Thanks so much.
It doesn鈥檛 look like there鈥檚 anything wrong here? 10:04:33.926Z is the same as 11:03:41 CET, it鈥檚 just displayed in a different timezone.
(If you need something that has better built-in support for timezones, you may want to use moment-timezone instead of the built-in Date class)
Ciao! How are you?
I don't understand, in V8 Chrome the new Date() is working, in NODE it is in GMT.
Why are they different?
It looks a bug.
Why are they different?
They are the same time, they aren鈥檛 different, it鈥檚 just a question of how they are displayed
Whatever. It is wrong.
new Date().toISOString() should give you the same result in browsers and Node, if that helps convince you
That's a hack. Chrome works right, this is a bug, but whatever, I am using TZ="Europe/Budapest" before node and now it works.
It doesn't respect the timezone. It uses always GMT that's how it does it.
The JavaScript specification in new Date() respect the timezone.
What you are saying is a hack and whatever I closed its.
I like to elaborate with other people as well.
On the web, this issue is a problem.
Today I learned GitHub has a 馃檮 emoticon! How useful!
It doesn't respect the timezone. It uses always GMT that's how it does it.
In fact it uses UTC. Closing this out again because it's emphatically not a bug.
oi reopen the issue m8 its affecting me
@SpeedyCraftah What exactly does your code do to get affected by the default console output format for dates?
What is shared on the screenshot is just visual representation of the Date objects, in console for Node.js and in Dev Tools for Chrome. The underlying Date object should be exactly the same.
Could you please explain how does that affect your setup and provide a testcase that passes (i.e. does nothing or prints 'OK') in Chrome and fails (i.e. throws an error or prints 'FAIL') in Node?
Also, this should be asked in nodejs/help instead of here.
Most helpful comment
It doesn鈥檛 look like there鈥檚 anything wrong here? 10:04:33.926Z is the same as 11:03:41 CET, it鈥檚 just displayed in a different timezone.
(If you need something that has better built-in support for timezones, you may want to use moment-timezone instead of the built-in
Dateclass)