Skip to content

Commit

Permalink
fix(event): fix rdate timezones
Browse files Browse the repository at this point in the history
  • Loading branch information
QHivert committed Mar 7, 2024
1 parent f609c31 commit e4cb0a3
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions SOPE/NGCards/iCalRepeatableEntityObject.m
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,25 @@ - (NSArray *) recurrenceDatesWithTimeZone: (id) theTimeZone
rDate = [rDates objectAtIndex: i];


if ((rdateTimezone =[rDate timeZone]))
{
//The property rdate can have the timezone, https://www.kanzaki.com/docs/ical/rdate.html
//In that case, dont force the
}
// Example: timezone is -0400, date is 2012-05-24 (00:00:00 +0000),
// and changes to 2012-05-24 04:00:00 +0000
else if ([theTimeZone isKindOfClass: [iCalTimeZone class]])

/*
VERY VERY STRANGE
Sogo seems to handle the date and timezone very strangely
The first event date will be in gmt BUT at the timezone hour
Ex: the event is at 09h15 +0200, the date in sogo will be 09h15 +0000...
So for the rdates, even if they are correct (meaning 07h15 +0000 which is 09h15 +0200)
We will have to set them to have 09h15 +0000 (in thas case it will be 11h15 +0200)...
*/
//the code below was before the fix above
// if ((rdateTimezone =[rDate timeZone]))
// {
// //The property rdate can have the timezone, https://www.kanzaki.com/docs/ical/rdate.html
// //In that case, dont force the
// }
// // Example: timezone is -0400, date is 2012-05-24 (00:00:00 +0000),
// // and changes to 2012-05-24 04:00:00 +0000
// else
if ([theTimeZone isKindOfClass: [iCalTimeZone class]])
{
rDate = [(iCalTimeZone *) theTimeZone computedDateForDate: rDate];
}
Expand Down

0 comments on commit e4cb0a3

Please sign in to comment.