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

fix: missing occurrences when there is a dst transition #229

Merged
merged 3 commits into from
Jan 3, 2024

Conversation

davec82
Copy link

@davec82 davec82 commented Apr 5, 2022

using datetime zoned to generate occurrences, in case of a dst transition, the occurrence on time change day is missing

jonasbadstuebner added a commit to jonasbadstuebner/cocktail that referenced this pull request Jun 28, 2023
@Matsa59
Copy link
Contributor

Matsa59 commented Nov 21, 2023

I got exactly this issue, could we consider this PR please ?

RRULE : every day AND ignoring the daylight saving : I want event at 10:00 every day

I store UTC date on db but I shift it on display.

[
  %{
    starts_at: ~U[2023-03-11 10:00:00Z],
    ends_at: ~U[2023-03-11 11:00:00Z],
    starts_at_timezone: "America/Montreal",
    ends_at_timezone: "America/Montreal"
  },
  %{
    starts_at: ~U[2023-03-13 09:00:00Z],
    ends_at: ~U[2023-03-13 10:00:00Z],
    starts_at_timezone: "America/Montreal",
    ends_at_timezone: "America/Montreal"
  }
]

If I removed the timezone it works BUT I have invalid hour obvs

In Quebec summer daylight saving is 12th march 2023 (timezone America/Montreal)

@Matsa59 Matsa59 mentioned this pull request Nov 22, 2023
Copy link

codecov bot commented Jan 3, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (230963f) 96.55% compared to head (7fee206) 96.41%.

Files Patch % Lines
lib/cocktail/validation/shift.ex 88.88% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #229      +/-   ##
==========================================
- Coverage   96.55%   96.41%   -0.14%     
==========================================
  Files          21       21              
  Lines         493      502       +9     
==========================================
+ Hits          476      484       +8     
- Misses         17       18       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@slvust slvust merged commit f3ea473 into peek-travel:main Jan 3, 2024
5 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants