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

BUG: yearly recurring event on last sunday of month X is shown every sunday #1132

Closed
Starkstromkonsument opened this issue Mar 27, 2022 · 2 comments · Fixed by #1465
Closed

Comments

@Starkstromkonsument
Copy link

I'm using Nextcloud Calendar with the sync client DAVx on my andorid devices and Etar. I have two events in my calandar, that should remind me of the clock change for the daylight saving time.

Etar shows the events on every sunday in march/october, not only on the last sunday as intended. It works fine in the WebUI of Nextcloud Calendar, Thunderbird Calendar and Samsung Calendar.

last sunday every march

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//IDN nextcloud.com//Calendar app 2.1.2//EN
CALSCALE:GREGORIAN
BEGIN:VEVENT
CREATED:20201025T160620Z
DTSTAMP:20201025T160822Z
LAST-MODIFIED:20201025T160822Z
SEQUENCE:2
UID:3b52ba5b-954d-4f83-a902-e43d1ab53cd7
DTSTART;VALUE=DATE:20200329
DTEND;VALUE=DATE:20200330
SUMMARY:Zeitumstellung 2:00 auf 3:00
DESCRIPTION:Umstellung von Winterzeit auf Sommerzeit. Jedes Jahr am letzten
  Wochenende des März (in der Nacht von Samstag auf Sonntag).
TRANSP:TRANSPARENT
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=SU;BYSETPOS=-1
END:VEVENT
END:VCALENDAR

grafik

last sunday every october

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//IDN nextcloud.com//Calendar app 2.1.2//EN
CALSCALE:GREGORIAN
BEGIN:VEVENT
CREATED:20201025T155842Z
DTSTAMP:20201025T160421Z
LAST-MODIFIED:20201025T160421Z
SEQUENCE:2
UID:40d997d7-0729-4381-b993-5eec31ef70b9
DTSTART;VALUE=DATE:20201025
DTEND;VALUE=DATE:20201026
SUMMARY:Zeitumstellung 3:00 auf 2:00
DESCRIPTION:Umstellung von Sommerzeit auf Winterzeit. Jedes Jahr am letzten
  Wochenende des Oktobers (in der Nacht von Samstag auf Sonntag)
TRANSP:TRANSPARENT
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=SU;BYSETPOS=-1
END:VEVENT
END:VCALENDAR

grafik

@tchernobog
Copy link

tchernobog commented Aug 2, 2022

I see a similar problem with an event like the following:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//IDN montecristosoftware.eu//cooking-schedule 0.0.0//EN
BEGIN:VEVENT
UID:[email protected]
DTSTAMP:20220729T192029Z
SUMMARY:Pasta fredda con pesto senza aglio
DESCRIPTION:cookbook@72130
LOCATION:https://ricette.giallozafferano.it/Pasta-fredda-con-pesto-senz-agl
 io.html
DTSTART;TZID=Europe/Berlin:20220705T184000
DTEND;TZID=Europe/Berlin:20220705T190000
RRULE:FREQ=YEARLY;BYDAY=TU;BYWEEKNO=27
BEGIN:VALARM
ACTION:DISPLAY
TRIGGER;RELATED=START:-PT15M
DESCRIPTION:Pasta fredda con pesto senza aglio
END:VALARM
END:VEVENT
END:VCALENDAR

I can confirm this bug, it applies also to RRULE:FREQ=YEARLY;BYDAY=<day>;BYWEEKNO=<weekno>.

@toolstack
Copy link
Contributor

I've tracked this down to a bug in the Android calendar code, it basically ignores BYWEEKNO and BYSETPOS in RRULE's.

I've submitted PR #1465 to resolve by using a different RRULE processor to double check if the ones returned by Android are valid or not.

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 a pull request may close this issue.

3 participants