tine-groupware / tine

tine groupware main repository
https://www.tine-groupware.de
GNU Affero General Public License v3.0
11 stars 2 forks source link

Events wrongly synchronized #41

Closed mokraemer closed 2 months ago

mokraemer commented 3 months ago

I'm facing the fact, that some appointments, created in tine are wrongly synchronized. If the appointment is at 13:00, the synchronized time is set to 14:00 (e.g. opensync on android). This happens since the update to the newer versions.

Looking into the caldav entry, the data looks good so far, but I can see, there is a timezone definition added to every calendar entry. Due to RFC7809 4.3:

  1. Clients can expect servers not to include standard time zone definitions in any iCalendar data they receive from the server, if there is no "CalDAV-Timezones" request header field in the HTTP request. Clients MUST retrieve standard time zone definitions either from its own cache of standard time zones or from the set of time zone distribution servers advertised by the CalDAV server (see Section 3.1.2).

The calendar entry should not contain this data.

mokraemer commented 3 months ago

Addtionally it looks like a synchronized thunderbird shows the appointment at the right time, but the reminder is shown 2h after the appointment.

mokraemer commented 3 months ago

It really looks wired what happens here and the appointments get moved and shown at the wrong times.

mokraemer commented 3 months ago

it looks like some calendar things come from caldav sync with thunderbird:

 WARN (4): Calendar_Model_Attender::resolveAttendee::1312 user_id missing from attender or not scalar: Array
    [id] => 029f863bc1115775fb4ccc46111d4ef54e34f58b
    [quantity] => 1
WARN (4): Calendar_Model_Attender::resolveAttendee::1312 user_id missing from attender or not scalar: Array
    [id] => 6362a380b66859415999326f29f7fb0ba9aceb40
    [quantity] => 1
WARN (4): Calendar_Model_Attender::resolveAttendee::1312 user_id missing from a
ttender or not scalar: Array
    [id] => 7f265b9387cbe08ccf275bd444a111b97de9d4e6
    [quantity] => 1
 WARN (4): Calendar_Model_Attender::resolveAttendee::1312 user_id missing from attender or not scalar: Array
    [id] => d1588d73c998b3d82ab2568090e0ff9c86e44e1a
    [quantity] => 1
WARN (4): Calendar_Model_Attender::resolveAttendee::1312 user_id missing from attender or not scalar: Array
    [id] => 634d84e0cda1c65413b183d452025747abe29181
    [quantity] => 1

I've checked the lines in tine20_cal_attendee - there is a user_id; so I don't really understand the meaning of this log

mokraemer commented 3 months ago

I've compared what Outlooks sends for timezone and what is generated by tine: Outlook:

BEGIN:VTIMEZONE
TZID:W. Europe Standard Time
BEGIN:STANDARD
DTSTART:16011028T030000
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:16010325T020000
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
END:DAYLIGHT
END:VTIMEZONE

tine:

BEGIN:VTIMEZONE
TZID:Europe/Berlin
BEGIN:DAYLIGHT
TZOFFSETFROM:+0100
RDATE;VALUE=DATE-TIME:20250330T020000,20260329T020000,20270328T020000,20280326T020000,
 20290325T020000,20300331T020000,20310330T020000,20320328T020000,20330327T020000,
 20340326T020000,20350325T020000,20360330T020000,20370329T020000
DTSTART:20250330T020000
TZNAME:CEST
TZOFFSETTO:+0200
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0200
RDATE;VALUE=DATE-TIME:20241027T030000,20251026T030000,20261025T030000,20271031T030000,
 20281029T030000,20291028T030000,20301027T030000,20311026T030000,20321031T030000,
 20331030T030000,20341029T030000,20351028T030000,20361026T030000,20371025T030000
DTSTART:20241027T030000
TZNAME:CET
TZOFFSETTO:+0100
END:STANDARD
END:VTIMEZONE

old tine genarted sth similar to outlook:

PRODID:-//tine20.com//Tine 2.0 Calendar V15.3//EN
CALSCALE:GREGORIAN
METHOD:REQUEST
X-CALENDARSERVER-ACCESS:PUBLIC
BEGIN:VTIMEZONE
TZID:Europe/Berlin
BEGIN:DAYLIGHT
TZOFFSETFROM:+0100
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
DTSTART:19810329T020000
TZNAME:CEST
TZOFFSETTO:+0200
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0200
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
DTSTART:19961027T030000
TZNAME:CET
TZOFFSETTO:+0100
END:STANDARD
END:VTIMEZONE
mokraemer commented 3 months ago

patching vendor/metaways/timezoneconvert/lib/TimeZoneConvert/VTimeZone.php with hardcoded old values solves the problem with thunderbird, OpenSync, ...

The newer strange definition does not work correctly!

corneliusweiss commented 2 months ago

what exact version of tine are you using? do you use our docker-images or any other hosting environment?

our unittests look normal, here the output from \Calendar_Convert_Event_VCalendar_MacOSXTest::testBackslashInDescription

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//tine ®//Calendar V17.1//EN
CALSCALE:GREGORIAN
X-CALENDARSERVER-ACCESS:PUBLIC
BEGIN:VTIMEZONE
TZID:Europe/Berlin
BEGIN:DAYLIGHT
TZOFFSETFROM:+0100
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
DTSTART:19810329T020000
TZNAME:CEST
TZOFFSETTO:+0200
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0200
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
DTSTART:19961027T030000
TZNAME:CET
TZOFFSETTO:+0100
END:STANDARD
END:VTIMEZONE
mokraemer commented 2 months ago

this is Version: Ellie (2023.11.8) (latest official release)

it worked in Version 15.3 which I used before and broke after the update.

mokraemer commented 2 months ago

After startup (synchronize) of thunderbird events got moved:

07-05-2024_08-53-57

corneliusweiss commented 2 months ago

from the other ticket i learned you're using php 8.2. tine supports 8.1 only atm. you can try the tests from https://github.com/tine20/timezoneconvert/tree/master to reproduce the problem. seems that https://php.net/manual/en/datetimezone.gettransitions.php changed its time format in 8.2

DateTimeInterface::ISO8601_EXPANDED (PHP 8.2 and later), or DateTimeInterface::ISO8601 (PHP 8.1 and lower) time string

corneliusweiss commented 2 months ago

if you want to try: https://github.com/tine20/timezoneconvert/pull/3

pschuele commented 2 months ago

fix is incoming ...