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

Incorrect calculation of sunrise and sunset for the days the DST time is set or unset #141

Closed
mifrey00 opened this issue Oct 29, 2017 · 0 comments

Comments

@mifrey00
Copy link

System: ▶ calaos-os-raspberrypi-v3.0-alpha6-0 on Raspberry Pi 1 B ▶ Wago_2.2/wago_881.pro on Wago 750-881

Since calaos_server calculates the sunrise and sunset every day at midnight, the calculation is not correct for the days the DST time is set or unset. For example, if on October 29th 2017 at 3:00, the clock time is changed from 3:00 to 2:00, the sunset and sunrise previously calculated at 0:00 have an error of +1 hour.

Sunset and sunrise are incorrect for October 29:

# journalctl -elu calaos-server
...
Oct 28 00:00:00 raspberrypi calaos_server[31372]: [INF] server (TimeRange.cpp:266) Horaire: Computing sunrise/sunset for date 28/10/2017
Oct 28 00:00:00 raspberrypi calaos_server[31372]: [INF] server (TimeRange.cpp:291) Horaire: sunrise is at 08:19 and sunset is at 18:21
...
Oct 29 00:00:00 raspberrypi calaos_server[31372]: [INF] server (TimeRange.cpp:266) Horaire: Computing sunrise/sunset for date 29/10/2017
Oct 29 00:00:00 raspberrypi calaos_server[31372]: [INF] server (TimeRange.cpp:291) Horaire: sunrise is at 08:21 and sunset is at 18:20
...

Sunset and sunrise are correct if calaos_server is restarted:

# systemctl restart calaos-server
# journalctl -elu calaos-server
...
Oct 29 08:49:02 raspberrypi calaos_server[3634]: [INF] server (TimeRange.cpp:266) Horaire: Computing sunrise/sunset for date 29/10/2017
Oct 29 08:49:02 raspberrypi calaos_server[3634]: [INF] server (TimeRange.cpp:291) Horaire: sunrise is at 07:21 and sunset is at 17:20
...

@raoulh raoulh closed this as completed in d398605 Oct 30, 2017
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