-
Notifications
You must be signed in to change notification settings - Fork 30
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
fix: shifting days across daylight savings boundaries #305
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And sorry for you but the fix didn't work with the following input :/
~Y[2024-03-08 02:00:00 America/Montreal]
|> Cocktail.schedule()
|> Schedule.add_recurrence_rule(:daily)
|> Cocktail.Schedule.occurrences()
|> Enum.take(3)
@Matsa59 ahh, it seems to be the time. i was testing with |
I fix the issue on #306, try it on your project to be sure everything is ok |
I don't know If it's ok to share this here (if not I can remove this comment at every moment) I develop a library that works the same way as cocktail (for validations) except we build the lib considering timezone from the beginning. Obvs cocktail manage more thing (like rule to string / from string) that we don't handle for the moment. Maybe it could help people facing on the timezone / DST problems What we do differently (if It could help here):
I prefer elixir to have less lib instead of having library that does the same things. So I guess we'll have to discute one day which one will survive et which one must be removed (it could be mine once cocktail fix DST problems) |
@Matsa59 awesome, i'll have a look! |
closing this as it doesn't solve all cases |
see #304 for context
the tests pass, however i'm really not sure if this will break existing functionality