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

DST hour_of_day realign bugfix #464

Merged
merged 6 commits into from
Oct 25, 2021

Conversation

jakebrady5
Copy link
Contributor

When using a rule with hour_of_day validations, and asking for occurrences on the day that DST skips forward, valid occurrences would be missed.

Adding the hour of day here was simply adding the hour to the start time, causing the result to pass an occurrence.

Using the spec example where the validation is set to the 19th hour of each day:

$ Time.local(2019, 3, 10, 0, 0, 0).in_time_zone('America/Denver') + 19.hours
=> Sun, 10 Mar 2019 20:00:00 MDT -06:00

For this situation, changing the TimeWrapper to use dst_adjust: true seems to be a clear choice. The specs did not contain any examples that were adversely affected by this change, but please let me know if anything comes to mind.

@pacso
Copy link
Collaborator

pacso commented Oct 25, 2021

@jakebrady5 - could you update the changelog please?

@pacso pacso merged commit 742220c into ice-cube-ruby:master Oct 25, 2021
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

Successfully merging this pull request may close these issues.

3 participants