Skip to content
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

Date not updated after system timezone change #4022

Closed
sebmj opened this issue Nov 25, 2015 · 8 comments
Closed

Date not updated after system timezone change #4022

sebmj opened this issue Nov 25, 2015 · 8 comments
Labels
v8 engine Issues and PRs related to the V8 dependency.

Comments

@sebmj
Copy link

sebmj commented Nov 25, 2015

When system timezone has changed during nodejs running new Date() is not updated with proper timezone and still works in old one. This is caused by V8 caching current date. Any suggestions how to solve this issue?

@evanlucas
Copy link
Contributor

Duplicate of #3449

@sebmj
Copy link
Author

sebmj commented Nov 25, 2015

@evanlucas I think this is different issue here, in that case timezone has changed from system level but nodejs not see this change.
e.g. on windows:

> new Date();
Wed Nov 25 2015 17:04:27 GMT+0100 (Central European Standard Time)

// changing timezone -> Date and Time -> change timezone..

> new Date();
Wed Nov 25 2015 17:04:38 GMT+0100 (Central European Standard Time)

@mscdex mscdex added the v8 engine Issues and PRs related to the V8 dependency. label Nov 25, 2015
@Fishrock123
Copy link
Contributor

@sebmj does it apply after a reboot? What OS?

@sebmj
Copy link
Author

sebmj commented Nov 25, 2015

Tested on WIndows 7, after nodejs restart timezone is correct, issue
applies only to running nodejs instance.

2015-11-25 19:56 GMT+01:00 Jeremiah Senkpiel notifications@github.com:

@sebmj https://github.com/sebmj does it apply after a reboot? What OS?


Reply to this email directly or view it on GitHub
#4022 (comment).

@evanlucas
Copy link
Contributor

The problem is that we don't really have a way to be notified that the timezone changed.

You can manually reset the date cache via v8, but it is costly. (https://github.com/evanlucas/reset-date-cache)

@srl295
Copy link
Member

srl295 commented Nov 26, 2015

Nor is it necessarily desirable for the zone to suddenly change.

@evanlucas
Copy link
Contributor

Closing as there is not really anything actionable to do at this point. Thanks!

@srl295
Copy link
Member

srl295 commented Feb 8, 2016

@evanlucas agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v8 engine Issues and PRs related to the V8 dependency.
Projects
None yet
Development

No branches or pull requests

5 participants