-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
is it a bug? setting up process.env.TZ depends on order of execution. #3449
Comments
The |
Doesn't seem to update after "a minute or so" (4 mins to be precise) for me here too:
|
ok, what if you create a new date object like |
the date does change immediately, that's true. still totally confused why this happens:
is that related to v8 tz handling too? looks like a bug to me |
setting edit if we want a way to change the default timezone, it should be a v8 feature request. |
I think because the given code is parsing your string as a date. Try |
@srl295 v8 internally calls |
So I'm thinking "not a bug, set time zone (in a platform specific way) before
startup"
|
@nsisodiya thoughts? |
@srl295 , you can close issue if you think this is not a bug if ! |
Closing, setting |
@srl295 if you don't mind me asking-what is "the right way" to set the default timezone? |
Should be set before the process runs, because it affects much of the initialization code. Probably should be set system wide, or at least for the user. |
I'd like to know how to set a timezone in my jest config, if possible https://stackoverflow.com/questions/56261381/how-do-i-set-a-timezone-in-my-jest-config |
This reverts commit 10da914. This workaround didn't work in Windows and is overall incorrect, according to nodejs/node#3449 (comment)
new Date('2015-10-20').getDay()
giving me 2. in first case, and in second case, it is giving me 1.Only difference is, In first case, I am calling it twice.
Also, Day is a timezone independant concept, I do not know why changing timezone, is giving different result.
The text was updated successfully, but these errors were encountered: