-
Notifications
You must be signed in to change notification settings - Fork 6
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
Recurring hourly times DST mismatch #1
Comments
I'm tempted to agree with you, however, the spec this library is trying to follow is actually pretty clear about the case:
I suspect the expectation is that an extra RDATE could be included to cover such missed instances, allowing implementers to decide what a fallback mechanism would do. I imagine this library or another could grow a helper function to "validate and correct" generated recurrences, to apply some fallback mechanism for these cases. I don't personally use this library much, but if you have motivation for that, by all means. I'm going to preemptively close this issue, but feel free to continue on here if you'd like. |
Oh I see, it's inconsistent. It should probably not emit that case on the 9th in the first example, going by the spec. Reopened the issue. But again, I still don't have the time to dig into this. I may someday, so I'll leave this here. But if you're motivated to do so, feel free. |
Thank you for the response. I agree that the spec is somewhat contradictory regarding these rules. My interpretation is as follows: Rule 1: Invalid recurrence instances must be ignored
Rule 2: Nonexistent/Ambiguous local times are interpreted as if they were explicitly specified DATE-TIME values
Rule 3:
Since nonexistent local times with a timezone reference are interpreted as
Applying this logic:
Edit: However, whether the rule
I completely understand that there’s only so much time in a day, and despite this edge cases (which might not be an edge-case at all), this package is still more consistent than the others. If I need to make adjustments later, I’ll push an update. |
This is very much an edge-case. Rather than explaining I'll illustrate with two examples below.
Daily Frequence:
That looks good. DST is respected during
2025-03-09 02:00:00
.Hourly Frequence:
Problem, since
2025-03-09 02:00:00 -0700 PDT
technically doesn't exist. Instead of returning2025-03-09 03:00:00 -0700 PDT
, it skips the day and returns the next date2025-03-10 02:00:00 -0700 PDT
instead.However, expected behaviour is for it to return the same as daily, i.e.
2025-03-09 03:00:00 -0700 PDT
.The text was updated successfully, but these errors were encountered: