mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-06-03 09:29:43 +00:00
iCalDateTIme: fix all-day entities
When setting an all-day entity (no time), make sure to set the NSCalendarDate to GMT before formatting the string.
This commit is contained in:
@@ -122,15 +122,13 @@
|
||||
else
|
||||
{
|
||||
tmpTime = [dateTime copy];
|
||||
utcTZ = [NSTimeZone timeZoneWithName: @"GMT"];
|
||||
[tmpTime setTimeZone: utcTZ];
|
||||
if (forAllDayEntity)
|
||||
timeString = [tmpTime iCalFormattedDateString];
|
||||
else
|
||||
{
|
||||
utcTZ = [NSTimeZone timeZoneWithName: @"GMT"];
|
||||
[tmpTime setTimeZone: utcTZ];
|
||||
timeString = [NSString stringWithFormat: @"%@Z",
|
||||
[tmpTime iCalFormattedDateTimeString]];
|
||||
}
|
||||
timeString = [NSString stringWithFormat: @"%@Z",
|
||||
[tmpTime iCalFormattedDateTimeString]];
|
||||
[tmpTime release];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user