File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -14,12 +14,16 @@ @implementation CalendarEventParser
1414
1515+(void )parseCalendar : (NSString *)icalEventString : (void (^)(CalendarEvent *))successBlock withErrorBlock : (void (^)(NSDictionary *))errorBlock
1616{
17- CalendarEvent *event = [self getCalendarEventComponents: icalEventString];
18- if (event) {
19- successBlock (event);
20- }else {
17+ if (icalEventString){
18+ CalendarEvent *event = [self getCalendarEventComponents: icalEventString];
19+ if (event) {
20+ successBlock (event);
21+ }else {
22+ errorBlock (nil );
23+ };
24+ }else {
2125 errorBlock (nil );
22- };
26+ }
2327}
2428
2529+(CalendarEvent *)getCalendarEventComponents : (NSString *)icsString
Original file line number Diff line number Diff line change @@ -166,7 +166,7 @@ +(NSTimeZone *)getTimezoneById:(NSString *)timezoneId
166166 });
167167
168168 NSString *timezoneName = [timeZoneMap valueForKey: timezoneId];
169- return timezoneName.length != 0 ? [NSTimeZone timeZoneWithName: timezoneName] : nil ;
169+ return timezoneName.length != 0 ? [NSTimeZone timeZoneWithName: timezoneName] : [ NSTimeZone timeZoneForSecondsFromGMT: 0 ] ;
170170}
171171
172172@end
You can’t perform that action at this time.
0 commit comments