Skip to content

Commit

Permalink
RecurrencePatternEvaluator: Adjust nonexistent recurrence instances a…
Browse files Browse the repository at this point in the history
…ccording to RFC 5545 3.3.5
  • Loading branch information
minichma committed Dec 28, 2024
1 parent d0ef8e7 commit 1c99517
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Ical.Net/Evaluation/RecurrencePatternEvaluator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,11 @@ private static Period CreatePeriod(DateTime dateTime, IDateTime referenceDate)
{
// Turn each resulting date/time into an IDateTime and associate it
// with the reference date.
IDateTime newDt = new CalDateTime(dateTime, referenceDate.TzId, referenceDate.HasTime);
IDateTime newDt = new CalDateTime(dateTime, null, referenceDate.HasTime);
if (referenceDate.TzId != null) {
// Adjust nonexistent recurrence instances according to RFC 5545 3.3.5
newDt = newDt.ToTimeZone(referenceDate.TzId);
}

newDt.AssociateWith(referenceDate);

Expand Down

0 comments on commit 1c99517

Please sign in to comment.