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

Events with RRULE get imported into the incorrect day with different timezones (enough for the day to differ from the inviter's TZ) #6459

Closed
shtrom opened this issue Nov 3, 2024 · 4 comments
Assignees
Labels
0. to triage Pending approval or rejection bug

Comments

@shtrom
Copy link
Member

shtrom commented Nov 3, 2024

Steps to reproduce

Maybe a similar issue to #6407, but in a different context: receiving an invitation with an RRULE from GCalendar in UTC-0400 when my Nextloud instance is in UTC+1000. When importing the ICS into Nexctloud, and getting it back out with vdirsyncer, I can see that the timezone in the ICS file has been updated to my local TZ, but the RRULE hasn't been updated accordingly, even if the event would be the next day for me.

  1. GCalendar in UTC-0600: invite a Nextcloud user late in the day (e.g., 16:00), with a weekly reccurence
  2. Import invite into Nextcloud
  3. Observe events in Nextcloud are at the right time, but a day early.

Expected behavior

Recurring events created, and shown at the correct (TZ-adjusted) time and days of the week.

Actual behaviour

Recurring events created, and shown at the correct (TZ-adjusted) time, BUT the days of the week are those in the original timezone (i.e., day before).

Calendar app version

No response

CalDAV-clients used

DAVx5, vdirsyncer

Browser

Firefox 132

Client operating system

Arch

Server operating system

Debian, official Docker container

Web server

Nginx

Database engine version

MariaDB

PHP engine version

PHP 8.2

Nextcloud version

29.0.8

Updated from an older installed version or fresh install

None

List of activated apps

No response

Nextcloud configuration

No response

Web server error log

No response

Log file

No response

Browser log

No response

Additional info

Observation in the ICS:

  • The original invitation attached to the email from GCal is in the sender's timezone:
DTSTART;TZID=America/Toronto:20241003T163000
DTEND;TZID=America/Toronto:20241003T173000
RRULE:FREQ=WEEKLY;WKST=SU;BYDAY=WE,MO,TH
  • The event created in Nextcloud has been converted to the local timezone (and the next day), BUT the RRULE hasn't been updated:
DTSTART;TZID=Australia/Sydney:20241004T063000
DTEND;TZID=Australia/Sydney:20241004T073000
RRULE:FREQ=WEEKLY;WKST=SU;UNTIL=20241028T035959Z;BYDAY=WE,MO,TH
  • The updated RRULE should contain BYDAY=TH,TU,FR
@SebastianKrupinski
Copy link
Contributor

SebastianKrupinski commented Nov 15, 2024

Hi @shtrom

The time zone should not be changed when importing the event, can you maybe post the original calendar invitation from GCalendar (you can redact all personal information)? There is a time zone block that I need to see.

Also, how was the event imported, through the mail app? Or a bulk import through the calendar app?

Sebastian

@shtrom
Copy link
Member Author

shtrom commented Nov 19, 2024

Hum, ok, so thinking about it, it's a long chain:

  1. I get the invites by email, which I open on my mobile with K9 Mail (an attached invite.ics)
  2. I import it into my local calendar with the stock Android (14) app
  3. It gets synced via DavX5 to Nextcloud (where it's already showing wrong)
  4. I then fetch it using vdirsyncer on my laptop, and can see the mismatched data.

Here's an example:

1. invite.ics attached to the email
BEGIN:VCALENDAR
PRODID:-//Google Inc//Google Calendar 70.9054//EN
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:REQUEST
BEGIN:VTIMEZONE
TZID:America/Toronto
X-LIC-LOCATION:America/Toronto
BEGIN:DAYLIGHT
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
TZNAME:EDT
DTSTART:19700308T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
TZNAME:EST
DTSTART:19701101T020000
RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
DTSTART;TZID=America/Toronto:20241003T163000
DTEND;TZID=America/Toronto:20241003T173000
RRULE:FREQ=WEEKLY;WKST=SU;BYDAY=WE,MO,TH
DTSTAMP:20241016T051524Z
ORGANIZER;CN=The Organiser:mailto:[email protected]
UID:[email protected]
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=ACCEPTED;RSVP=TRUE
 ;CN=The Organiser;X-NUM-GUESTS=0:mailto:[email protected]
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=ACCEPTED;RSVP=TRUE
 ;CN=Olivier Mehani;X-NUM-GUESTS=0:mailto:[email protected]
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=
 TRUE;[email protected];X-NUM-GUESTS=0:mailto:[email protected]
X-MICROSOFT-CDO-OWNERAPPTID:-574496198
CREATED:20240917T142250Z
DESCRIPTION:<p>test for nextcloud/calendar#6459
LAST-MODIFIED:20241016T051521Z
LOCATION:https://github.com/nextcloud/calendar/issues/6459
SEQUENCE:4
STATUS:CONFIRMED
SUMMARY:test for nextcloud/calendar#6459
TRANSP:OPAQUE
ATTACH;FILENAME=Notes - Olivier / The;FMTTYPE=application/vnd.google-app
 s.document:https://github.com/nextcloud/calendar/issues/6459
BEGIN:VALARM
ACTION:DISPLAY
DESCRIPTION:This is an event reminder
TRIGGER:-P0DT0H10M0S
END:VALARM
END:VEVENT
END:VCALENDAR
4. the vdirsyncer-fetched event
BEGIN:VCALENDAR
VERSION:2.0
PRODID:DAVx5/4.4.3.2-ose ical4j/3.2.19 (com.google.android.calendar)
BEGIN:VEVENT
DTSTAMP:20241119T091406Z
UID:[email protected]
SUMMARY:test for nextcloud/calendar#6459
LOCATION:https://github.com/nextcloud/calendar/issues/6459
DESCRIPTION:<p>test for nextcloud/calendar#6459
DTSTART;TZID=Australia/Sydney:20241004T063000
DTEND;TZID=Australia/Sydney:20241004T073000
RRULE:FREQ=WEEKLY;WKST=SU;BYDAY=WE,MO,TH
ORGANIZER:mailto:[email protected]
ATTENDEE;RSVP=TRUE;CN=Olivier Mehani;PARTSTAT=ACCEPTED:mailto:participant@e
 xample.com
ATTENDEE;RSVP=TRUE;CN=The Organiser;PARTSTAT=ACCEPTED:mailto:organiser@exam
 ple.com
ATTENDEE;RSVP=TRUE;[email protected];PARTSTAT=ACCEPTED:mailto:shtrom@example.
 net
END:VEVENT
BEGIN:VTIMEZONE                                                                                                                                                         
TZID:Australia/Sydney
BEGIN:STANDARD
TZNAME:AEST
TZOFFSETFROM:+1100
TZOFFSETTO:+1000
DTSTART:20080406T030000
RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
END:STANDARD
BEGIN:DAYLIGHT
TZNAME:AEDT
TZOFFSETFROM:+1000
TZOFFSETTO:+1100
DTSTART:20081005T020000
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=1SU
END:DAYLIGHT
END:VTIMEZONE
END:VCALENDAR

Hum... I'm starting to suspect the issue is with DavX5 🤔

@shtrom
Copy link
Member Author

shtrom commented Nov 19, 2024

(Started bitfireAT/davx5-ose#1134 on the DavX5 side)

@SebastianKrupinski
Copy link
Contributor

Morning @shtrom

To me this looks like a DavX5 issue. It is altering the time zones.

Original time zone from Google is America/Toronto

PRODID:-//Google Inc//Google Calendar 70.9054//EN

BEGIN:VTIMEZONE
	TZID:America/Toronto
	X-LIC-LOCATION:America/Toronto

BEGIN:DAYLIGHT
	TZOFFSETFROM:-0500
	TZOFFSETTO:-0400
	TZNAME:EDT
	DTSTART:19700308T020000
	RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
END:DAYLIGHT
BEGIN:STANDARD
	TZOFFSETFROM:-0400
	TZOFFSETTO:-0500
	TZNAME:EST
	DTSTART:19701101T020000
	RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU
END:STANDARD
END:VTIMEZONE

DTSTART;TZID=America/Toronto:20241003T163000
DTEND;TZID=America/Toronto:20241003T173000

And then it gets changed by DAVx5 to

PRODID:DAVx5/4.4.3.2-ose ical4j/3.2.19 (com.google.android.calendar)

BEGIN:VTIMEZONE                                                                                                                                                         
	TZID:Australia/Sydney

BEGIN:STANDARD
	TZNAME:AEST
	TZOFFSETFROM:+1100
	TZOFFSETTO:+1000
	DTSTART:20080406T030000
	RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
END:STANDARD
BEGIN:DAYLIGHT
	TZNAME:AEDT
	TZOFFSETFROM:+1000
	TZOFFSETTO:+1100
	DTSTART:20081005T020000
	RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=1SU
END:DAYLIGHT
END:VTIMEZONE

DTSTART;TZID=Australia/Sydney:20241004T063000
DTEND;TZID=Australia/Sydney:20241004T073000

Nextcloud does not alter the time zones when an event is created so the change has to be DAVx5. The entire event should be passed to Nextcloud without alteration.

I will close this ticket in the mean time. Thank you for the report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. to triage Pending approval or rejection bug
Projects
Development

No branches or pull requests

2 participants