Maemo Calendar: fix EXDATEs after reading from storage
If the event has a DTSTART with TZID, then the EXDATE also should have that same TZID. It is uncertain whether the backend provides the TZID, but even if it does, because of the SIMPLE-EXDATE rule the value wouldn't be parsed. (cherry picked from commit 6d80112dc4959e8c4f940b026e0447fcf7256142)
This commit is contained in:
parent
0027f48fbc
commit
b7d2ce6751
|
@ -78,6 +78,7 @@ void MaemoCalendarSource::getSynthesisInfo(SynthesisInfo &info,
|
|||
{
|
||||
TrackingSyncSource::getSynthesisInfo(info, fragments);
|
||||
info.m_backendRule = "MAEMO-CALENDAR";
|
||||
info.m_afterReadScript += "$FIX_EXDATE_SCRIPT;\n";
|
||||
}
|
||||
|
||||
void MaemoCalendarSource::open()
|
||||
|
|
|
@ -188,6 +188,26 @@
|
|||
}
|
||||
]]></macro>
|
||||
|
||||
<macro name="FIX_EXDATE_SCRIPT"><![CDATA[
|
||||
// Add time zone information to EXDATEs: necessary for
|
||||
// the Maemo calendar storages because it uses EXDATE
|
||||
// without TZID.
|
||||
if (!ISFLOATING(DTSTART)) {
|
||||
STRING tz;
|
||||
tz = TIMEZONE(DTSTART);
|
||||
if (tz != "UTC") {
|
||||
INTEGER i;
|
||||
i = 0;
|
||||
while (i<SIZE(EXDATES)) {
|
||||
if (ISFLOATING(EXDATES[i])) {
|
||||
SETTIMEZONE(EXDATES[i], tz);
|
||||
}
|
||||
i=i+1;
|
||||
}
|
||||
}
|
||||
}
|
||||
]]></macro>
|
||||
|
||||
<!-- Uses the UID/RECURRENCE-ID fields as the only criteria for
|
||||
comparing calendar data if the VCALENDAR_COMPARE_UID session
|
||||
variable is true, else does a normal comparison of the
|
||||
|
|
Loading…
Reference in a new issue