nextcloud / calendar

📆 Calendar app for Nextcloud
https://apps.nextcloud.com/apps/calendar
GNU Affero General Public License v3.0
952 stars 235 forks source link

Nextcloud Appointments: Timezone disparity between web UI and Thunderbird/Merkuro #5734

Open karthikiyengar opened 5 months ago

karthikiyengar commented 5 months ago

Steps to reproduce

  1. Book an appointment in a Timezone different than your home timezone
  2. Check the Calendar webapp. The event should be displayed in your home timezone.
  3. On some CalDav clients (Thunderbird/Merkuro), the timezone is displayed incorrectly

Expected behavior

All CalDav clients should show you the event in your home timezone instead of UTC.

Actual behaviour

Some CalDav clients show the event in UTC timezone.

Nextcloud Calendar Web UI: The event was scheduled in Asia/Kolkata, and shows up correctly in my Timezone (Europe/Berlin) image

Thunderbird: The event shows up in UTC time image

Merkuro Calendar: Same behaviour image

However, the event is shown correctly on my home timezone on the iOS calendar.

Calendar app version

4.6.4

CalDAV-clients used

Thunderbitd, Merkuro, iOS

Browser

No response

Client operating system

No response

Server operating system

No response

Web server

None

Database engine version

None

PHP engine version

None

Nextcloud version

No response

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

No response

miaulalala commented 3 months ago

Ics from such an affected event:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Sabre//Sabre VObject 4.5.4//EN
CALSCALE:GREGORIAN
BEGIN:VTIMEZONE
TZID:Asia/Shanghai
X-MICROSOFT-CDO-TZID:45
END:VTIMEZONE
BEGIN:VEVENT
UID:sabre-vobject-e4d41552-4997-4cab-ba4b-be16bcbd5bbd
DTSTAMP:20240321T102318Z
SUMMARY:XXXX XXX - Meet oOo Nextcloud 
STATUS:CONFIRMED
DTSTART;TZID=Asia/Shanghai:20240325T170000
DTEND;TZID=Asia/Shanghai:20240325T174500
ORGANIZER;CN=Xxxxxx Xxxxxxxxx;CUTYPE=INDIVIDUAL;PARTSTAT=ACCEPTED:mailto:x
 xxxxx.xxxxxxxxx@nextcloud.com
ATTENDEE;CN=Xxxxxx Xxxxxxxxx;CUTYPE=INDIVIDUAL;RSVP=TRUE;ROLE=REQ-PARTICIP
 ANT;PARTSTAT=ACCEPTED:mailto:xxxxxx.xxxxxxxxx@nextcloud.com
ATTENDEE;CN=Xxxxxx Xxx;CUTYPE=INDIVIDUAL;RSVP=TRUE;ROLE=REQ-PARTICIPANT;PAR
 TSTAT=ACCEPTED;SCHEDULE-STATUS=3.7:mailto:xxxxx@xxxxxxxxx.com
LOCATION:https://cloud.nextcloud.com/call/xxxxxxxxxx
X-NC-APPOINTMENT:SYmY34jLSToD
END:VEVENT
END:VCALENDAR
miaulalala commented 3 months ago

@karthikiyengar Can you please check your timezone settings for Thunderbird? You can find that in the left bottom corner in your settings.

miaulalala commented 3 months ago

What Thunderbird does with it is something else entirely:


BEGIN:VTIMEZONE
TZID:Asia/Shanghai
X-TZINFO:Asia/Shanghai[2024a]
BEGIN:STANDARD
TZOFFSETTO:+080000
TZOFFSETFROM:+080543
TZNAME:Asia/Shanghai(STD)
DTSTART:19010101T000000
RDATE:19010101T000000
END:STANDARD
BEGIN:DAYLIGHT
TZOFFSETTO:+090000
TZOFFSETFROM:+080000
TZNAME:Asia/Shanghai(DST)
DTSTART:19190413T000000
RDATE:19190413T000000
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETTO:+080000
TZOFFSETFROM:+090000
TZNAME:Asia/Shanghai(STD)
DTSTART:19191001T000000
RDATE:19191001T000000
END:STANDARD
BEGIN:DAYLIGHT
TZOFFSETTO:+090000
TZOFFSETFROM:+080000
TZNAME:Asia/Shanghai(DST)
DTSTART:19400601T000000
RDATE:19400601T000000
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETTO:+080000
TZOFFSETFROM:+090000
TZNAME:Asia/Shanghai(STD)
DTSTART:19401013T000000
RDATE:19401013T000000
END:STANDARD
BEGIN:DAYLIGHT
TZOFFSETTO:+090000
TZOFFSETFROM:+080000
TZNAME:Asia/Shanghai(DST)
DTSTART:19410315T000000
RDATE:19410315T000000
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETTO:+080000
TZOFFSETFROM:+090000
TZNAME:Asia/Shanghai(STD)
DTSTART:19411102T000000
RDATE:19411102T000000
END:STANDARD
BEGIN:DAYLIGHT
TZOFFSETTO:+090000
TZOFFSETFROM:+080000
TZNAME:Asia/Shanghai(DST)
DTSTART:19420131T000000
RDATE:19420131T000000
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETTO:+080000
TZOFFSETFROM:+090000
TZNAME:Asia/Shanghai(STD)
DTSTART:19450902T000000
RDATE:19450902T000000
END:STANDARD
BEGIN:DAYLIGHT
TZOFFSETTO:+090000
TZOFFSETFROM:+080000
TZNAME:Asia/Shanghai(DST)
DTSTART:19460515T000000
RDATE:19460515T000000
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETTO:+080000
TZOFFSETFROM:+090000
TZNAME:Asia/Shanghai(STD)
DTSTART:19461001T000000
RDATE:19461001T000000
END:STANDARD
BEGIN:DAYLIGHT
TZOFFSETTO:+090000
TZOFFSETFROM:+080000
TZNAME:Asia/Shanghai(DST)
DTSTART:19470415T000000
RDATE:19470415T000000
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETTO:+080000
TZOFFSETFROM:+090000
TZNAME:Asia/Shanghai(STD)
DTSTART:19471101T000000
RDATE:19471101T000000
END:STANDARD
BEGIN:DAYLIGHT
TZOFFSETTO:+090000
TZOFFSETFROM:+080000
TZNAME:Asia/Shanghai(DST)
DTSTART:19480501T000000
RDATE:19480501T000000
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETTO:+080000
TZOFFSETFROM:+090000
TZNAME:Asia/Shanghai(STD)
DTSTART:19481001T000000
RDATE:19481001T000000
END:STANDARD
BEGIN:DAYLIGHT
TZOFFSETTO:+090000
TZOFFSETFROM:+080000
TZNAME:Asia/Shanghai(DST)
DTSTART:19490501T000000
RDATE:19490501T000000
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETTO:+080000
TZOFFSETFROM:+090000
TZNAME:Asia/Shanghai(STD)
DTSTART:19490528T000000
RDATE:19490528T000000
END:STANDARD
BEGIN:DAYLIGHT
TZOFFSETTO:+090000
TZOFFSETFROM:+080000
TZNAME:Asia/Shanghai(DST)
DTSTART:19860504T020000
RDATE:19860504T020000
END:DAYLIGHT
BEGIN:DAYLIGHT
TZOFFSETTO:+090000
TZOFFSETFROM:+080000
TZNAME:Asia/Shanghai(DST)
DTSTART:19870412T020000
RDATE:19870412T020000
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETTO:+080000
TZOFFSETFROM:+090000
TZNAME:Asia/Shanghai(STD)
DTSTART:19860914T020000
RRULE:FREQ=YEARLY;BYMONTH=9;BYDAY=2SU;UNTIL=19880911T020000
END:STANDARD
BEGIN:DAYLIGHT
TZOFFSETTO:+090000
TZOFFSETFROM:+080000
TZNAME:Asia/Shanghai(DST)
DTSTART:19880417T020000
RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=3SU;UNTIL=19900415T020000
END:DAYLIGHT
BEGIN:DAYLIGHT
TZOFFSETTO:+090000
TZOFFSETFROM:+080000
TZNAME:Asia/Shanghai(DST)
DTSTART:19910414T020000
RDATE:19910414T020000
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETTO:+080000
TZOFFSETFROM:+090000
TZNAME:Asia/Shanghai(STD)
DTSTART:19890917T020000
RRULE:FREQ=YEARLY;BYMONTH=9;BYDAY=3SU;UNTIL=19910915T020000
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
CREATED:20240324T164632Z
LAST-MODIFIED:20240324T164632Z
DTSTAMP:20240324T164632Z
UID:sabre-vobject-e4d41552-4997-4cab-ba4b-be16bcbd5bbd
SUMMARY:Xxxxxx Xxx - Meet oOo Nextcloud 
STATUS:CONFIRMED
ORGANIZER;CN=Xxxxxx Xxxxxxxxx;PARTSTAT=ACCEPTED;CUTYPE=INDIVIDUAL:mailto:x
 xxxxx.xxxxxxxxxx@nextcloud.com
ATTENDEE;RSVP=TRUE;CN=Xxxxxx Xxxxxxxxx;PARTSTAT=ACCEPTED;CUTYPE=INDIVIDUAL
 ;ROLE=REQ-PARTICIPANT:mailto:xxxxxx.xxxxxxxxxx@nextcloud.com
ATTENDEE;RSVP=TRUE;CN=Xxxxxx Xxx;PARTSTAT=ACCEPTED;CUTYPE=INDIVIDUAL;ROLE=R
 EQ-PARTICIPANT;SCHEDULE-STATUS=3.7:mailto:xxxxx@xxxxxxxxx.com
DTSTART;TZID=Asia/Shanghai:20240326T010000
DTEND;TZID=Asia/Shanghai:20240326T014500
LOCATION:https://cloud.nextcloud.com/call/xxxxxxxxxx
X-NC-APPOINTMENT:SYmY34jLSToD
END:VEVENT
miaulalala commented 3 months ago

Right, importing the appointment ics gives me a wrong result in Thunderbird:

image

I is confushon

miaulalala commented 3 months ago

Hello darkness my old friend https://bugzilla.mozilla.org/show_bug.cgi?id=729685

karthikiyengar commented 3 months ago

Thanks a lot for diving into the details. Seems like a painful issue to debug.

I'm unsure where the problem lies. Since Merkuro seems to be having trouble too, wondering if the onus falls on NC or on the affected clients?

miaulalala commented 3 months ago

Thanks a lot for diving into the details. Seems like a painful issue to debug.

I'm unsure where the problem lies. Since Merkuro seems to be having trouble too, wondering if the onus falls on NC or on the affected clients?

Not sure to be honest, I think there might be some issues with how we create VTIMEZONE components in addition to the Mozilla bug. I tested it with three different VTIMEZONE components for the same Timezone (One with a simple TIMEZONE, one with TIMEZONE and OFFSET and one with historical DST components) and all three gave me different results. So I will have to figure out which one works and make that the default for our generated ICS to compensate. I hope this will also allow for synced events from our backend to be displayed correctly in TB, and hopefully Merkurio too.