You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Date not updated after system timezone change #4022
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 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:
>newDate();WedNov25201517:04:27GMT+0100(CentralEuropeanStandardTime)// changing timezone -> Date and Time -> change timezone..>newDate();WedNov25201517:04:38GMT+0100(CentralEuropeanStandardTime)
Activity
evanlucas commentedon Nov 25, 2015
Duplicate of #3449
sebmj commentedon 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:
Fishrock123 commentedon Nov 25, 2015
@sebmj does it apply after a reboot? What OS?
sebmj commentedon 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:
evanlucas commentedon Nov 25, 2015
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 commentedon Nov 26, 2015
Nor is it necessarily desirable for the zone to suddenly change.
evanlucas commentedon Feb 8, 2016
Closing as there is not really anything actionable to do at this point. Thanks!
srl295 commentedon Feb 8, 2016
@evanlucas agree
Make clock/calendar aware of system timezone changes. Fixes #21