-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use ActiveSupport::Duration to apply time offsets
Using seconds to apply the time offsets when the parsed time is in the past is not time zone aware. This causes issues when DST begins/ends between the two times. For example, daily jobs are scheduled an hour earlier than the are supposed to when DST ends since it doesn't take the extra hour into account. This causes further issues when calculating the next offset time, the offset to prevent scheduling past times doesn't apply as expected and the job is scheduled over and over. As a related issue, we sometimes need a two hour jump to bring the parsed time to the future, add a while loop to handle this case.
- Loading branch information
Showing
4 changed files
with
37 additions
and
3 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
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