Skip to content

TimePeriod/ScheduledDowntime: improve DST handling #9253

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

Merged
merged 2 commits into from
Feb 23, 2022

Conversation

yhabteab
Copy link
Member

Backport of #8921

Many functions of LegacyTimePeriod take a tm pointer as an input parameter and
then pass it to mktime() which actually modifies it. This causes problems if
tm_isdst was intentionally set to -1 (to automatically detect whether DST is
active at some time) and then a function is called that implicitly sets
tm_isdst and then the values of tm are modified in a way that crosses a DST
change. This resulted in 1 hour offsets with ScheduledDowntimes on days with
DST changes.
@cla-bot cla-bot bot added the cla/signed label Feb 23, 2022
@icinga-probot icinga-probot bot added this to the 2.12.7 milestone Feb 23, 2022
@icinga-probot icinga-probot bot added area/runtime Downtimes, comments, dependencies, events bug Something isn't working labels Feb 23, 2022
@Al2Klimov Al2Klimov enabled auto-merge February 23, 2022 12:38
@Al2Klimov Al2Klimov merged commit 5ec8097 into support/2.12 Feb 23, 2022
@icinga-probot icinga-probot bot deleted the bugfix/timeperiod-dst branch February 23, 2022 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/runtime Downtimes, comments, dependencies, events bug Something isn't working cla/signed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants