-
Notifications
You must be signed in to change notification settings - Fork 358
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix double occurrences in end of DST
Simplify the method we use for calculating time changes across DST boundaries by performing arithmetic under UTC to get "absolute" values. This is a revert of the "unrolling in pairs" method introduced in c93fa7e for fixing #189. The method of converting to UTC and back for doing time arithmetic only applies when DST needs to be taken into consideration. For rules with less than daily intervals, both hours still need to occur. This distinction was added in the original fix. However, the method was not correctly tested for non-ActiveSupport times (local system TZ) and the advancing of time to the next occurrence was validating both the last DT hour (before fall back) and first ST hour (after fall back) causing double occurrences for the "same" hour on the clock face. Fixes #398
- Loading branch information
Showing
3 changed files
with
28 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters