fix(calendar): Fix all day recurring event displayed on 2 days when a DST change occurs at the endDate

This commit is contained in:
smizrahi
2024-08-28 10:26:22 +02:00
parent c1e4dc5a0e
commit 2f75a7fb1b

View File

@@ -351,7 +351,7 @@ static NSArray *tasksFields = nil;
if (daylightOffset)
{
// If it is the end date and allday, we need to remove the offset
if ([fields[count * 2] isEqualToString: @"endDate"] && [[theRecord objectForKey: @"c_isallday"] boolValue])
if ([fields[count * 2] isEqualToString: @"endDate"] && [[theRecord objectForKey: @"c_isallday"] boolValue] && daylightOffset > 0)
aDate = [aDate dateByAddingYears: 0 months: 0 days: 0 hours: 0
minutes: 0 seconds: -1 * daylightOffset];
else