Open ner00 opened 3 years ago
function adjust_timezone
from libcalendaring seems to be what's being used to incorrectly offset the time for me:
$dt->setTimezone($this->timezone);
Commenting the function keeps the correct time in the calendar overview but not in the detail (edit) window.
The code seems fine though, as does the content of $this->timezone
[timezone_type] => 3
[timezone] => Europe/London
In any case, there must be some reason why the date/time and timezone is fine everywhere but the event time still gets offset forward by 1 hour in the calendar view.
Okay, so the problem seems two-fold:
adjust_timezone
. The VCALENDAR entry has an explicit timezone of GMT, but no DST information. Not sure if that would be a standard piece of information or not.$dt
object sent to adjust_timezone
function:
[date] = > "2021-04-28 09:00:00.000000"
[timezone_type] => 3
[timezone] => "UTC"
Because it receives UTC and/or no DST information, adjust_timezone
will add the DST offset (+01:00) to an already DST-based timestamp. The event's start/end date, time, timezone, DST should all be validated before being passed on to adjust_timezone
.
Roundcube correctly detects my timezone as GMT+00:00 (Europe/London), the VCalendar entries are grabbed correctly but then the interface shows the wrong date/time for event start/end. Here's an example:
Interface shows this as being scheduled from 10:00 to 10:30 (essentially adding +01:00 for no reason), but in the database it's correctly recorded as starting at 2021-04-28 09:00:00 and ending at 2021-04-28 09:30:00
Should I look somewhere in specific to fix this?