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

Revisit Resolvers #295

Closed
GoogleCodeExporter opened this issue Mar 15, 2015 · 2 comments
Closed

Revisit Resolvers #295

GoogleCodeExporter opened this issue Mar 15, 2015 · 2 comments
Milestone

Comments

@GoogleCodeExporter
Copy link

For v2, I think we should reconsider which resolvers we include and the 
behavior of the LenientResolver.

Personally, I can't think of a use case for ReturnStartOfIntervalAfter or 
ReturnEndOfIntervalBefore.  These do more than compensate for the gap, as they 
shift the time by an amount other than the DST saving.

For example, if you had a job scheduling system with a recurrence pattern like 
"Daily at 2:30 AM Pacific Time", and you used the ReturnStartOfIntervalAfter 
resolver, the job would run at 3:00 AM on the day of the spring-forward 
transition.  One would commonly expect the job to run at 3:30 AM - the original 
time plus the DST shifted amount.  We need to include a resolver that has this 
behavior.  Perhaps "ReturnForwardShifted" or something like that.

The LenientResolver combines ReturnStartOfIntervalAfter and ReturnLater. 
Thinking of the same use case, it would be strange if a "Daily at 1:00 AM" job 
didn't fire at 1:00 on the day of the fall-back transition just because it was 
waiting for the second instance of 1:00 AM.  We should consider changing the 
composition of the LenientResolver, to ReturnForwardShifter and ReternEarlier.  
This would be a breaking change, but that's something that we could document as 
a v2 feature.

Original issue reported on code.google.com by mj1856 on 25 Jun 2014 at 8:04

@GoogleCodeExporter
Copy link
Author

Original comment by malcolm.rowe on 2 Aug 2014 at 8:53

  • Added labels: Type-Enhancement, Milestone-2.0-consider

@GoogleCodeExporter
Copy link
Author

Possible implementation here:
http://stackoverflow.com/a/25124701/634824

Original comment by mj1856 on 4 Aug 2014 at 6:21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants