peek-travel / cocktail

Elixir date recurrence library based on iCalendar events
https://hexdocs.pm/cocktail
MIT License
222 stars 30 forks source link

fix: shifting days across daylight savings boundaries #305

Closed gf3 closed 3 months ago

gf3 commented 8 months ago

see #304 for context

the tests pass, however i'm really not sure if this will break existing functionality

gf3 commented 8 months ago

@Matsa59 ahh, it seems to be the time. i was testing with 00:00:00 but it fails in your scenario with 02:00:00

Matsa59 commented 8 months ago

I fix the issue on #306, try it on your project to be sure everything is ok

Matsa59 commented 4 months ago

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.

https://hexdocs.pm/ex_cycle

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)

gf3 commented 4 months ago

@Matsa59 awesome, i'll have a look!

gf3 commented 3 months ago

closing this as it doesn't solve all cases