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:
Francis Lachapelle
2013-01-21 13:40:11 -05:00
parent 5c3dc34440
commit d835921062
+4 -6
View File
@@ -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];
}
}