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

Minutes until sun events are off if the system timezone is set correctly #1

Closed
codetwice opened this issue May 31, 2014 · 1 comment

Comments

@codetwice
Copy link

I started using this module on my Ninjablock and saw that the minutes till sunset and sunrise were off by about a hundred. I checked the config, my latitude/longitude was set up correctly.

My Ninjablock's system timezone was set for my location (CEST). I was suspecting this to be the root of the problem and I think I was right: commenting out the following lines of lib/device.js fixed the problem:

sunrise_today.addMinutes(-now.getTimezoneOffset());
sunrise_tomorrow.addMinutes(-tomorrow.getTimezoneOffset());
sunset_today.addMinutes(-now.getTimezoneOffset());
@pablorodiz
Copy link
Owner

These lines were included in order to correct timezone in places where sumer/winter time corrections are used, but I was not really sure if this was already corrected in the time zone time values or not. I will follow your advice to remove those lines in the code and see if it works better for everyone.

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

2 participants