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

System time zone change is not detected #101

Open
mass85 opened this issue May 11, 2017 · 0 comments
Open

System time zone change is not detected #101

mass85 opened this issue May 11, 2017 · 0 comments

Comments

@mass85
Copy link

mass85 commented May 11, 2017

It seems that system time zone is read only when node-time module is loaded. This implies that when system time zone is changed, new Date objects get the old time zone.

const time = require('time');
 
let now = new time.Date();
console.log(now.getTimezone()); // Europe/Warsaw

// change system time zone to America/Whitehorse now (i.e. from command line)

setTimeout(function() {
  let now = new time.Date();
  console.log(now.getTimezone()); // Europe/Warsaw
  done();
}, 5000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant