Skip to content

Commit 686e92d

Browse files
committed
oxcical: fix wrong BYMONTH calculation for ical-exported MONTHNTH recurrences
There appears to be a missing call to `ical_get_itime_from_yearday`. The RRULE line for a yearly recurrence "every 1st Sunday in May" produced: RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=SU;BYSETPOS=1;BYMONTH=172800 Fixes: gromox-0~666 References: GXH-149
1 parent 936751f commit 686e92d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/mapi/oxcical.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2978,7 +2978,8 @@ static bool oxcical_export_rrule(const ical_component *ptz_component,
29782978
piline->append_value("BYSETPOS", "-1");
29792979
else
29802980
piline->append_value("BYSETPOS", std::to_string(apr->recur_pat.pts.monthnth.recurnum));
2981-
piline->append_value("BYMONTH", std::to_string(apr->recur_pat.firstdatetime));
2981+
ical_get_itime_from_yearday(1601, apr->recur_pat.firstdatetime / 1440 + 1, &itime);
2982+
piline->append_value("BYMONTH", std::to_string(itime.month));
29822983
}
29832984
break;
29842985
}

0 commit comments

Comments
 (0)