title: Why Duplicate Events are adding While updating the Event in IOS?
body: <p>I have an event from 16 Feb, 2015 to 20 Feb, 2015 at 10AM with an alarm set to it.</p>
  
  <p>It is saved fine at calendar. When I update my event like time from 10AM to 2AM. It is updating at calendar also.</p>
  
  <p>But from 17 Feb, 2015 to 20 Feb, 2015 the event is adding with 9AM(expected) and also with 12AM(Duplicate Event of above) is adding.</p>
  
  <p>So when ever I am updating the events From date to To date the duplicates is adding with 12AM time.(Every time event with 12AM is adding to calendar along with original event)<img src="https://i.stack.imgur.com/Qq2cJ.png" alt="Duplicate Calendar Events Image"></p>
  
  <p>Here is my code for Updating the existing event</p>
  
  <pre><code>EKEvent *event = [EKEvent eventWithEventStore:self.eventStore];
  event = [self.eventStore eventWithIdentifier:eventIdentifierOfExisting];
  event.title = @“Calciferol”;    
      event.startDate = pickerFirstAlarm.date;//firstcombDate
      event.endDate = pickerEndDate.date;
  
      if ([btnEndDate.titleLabel.text isEqualToString:@"Select"]) {
          EKRecurrenceEnd *endRecurrence = [EKRecurrenceEnd recurrenceEndWithOccurrenceCount:14];//EKRecurrenceFrequencyDaily
          EKRecurrenceRule *rule = [[EKRecurrenceRule alloc] initRecurrenceWithFrequency:EKRecurrenceFrequencyDaily interval:1 end:endRecurrence];
          [event addRecurrenceRule:rule];
      }
      event.notes = @“Calcium”;
      NSTimeInterval aInterval = -5 *60;
      EKAlarm *alaram = [EKAlarm alarmWithRelativeOffset:aInterval];
      [event addAlarm:alaram];
      [event setCalendar:self.defaultCalendar];
       if (event.availability != EKEventAvailabilityNotSupported) {
           event.availability = EKEventAvailabilityFree;
       }
       NSError *err = nil;
      [self.eventStore saveEvent:event span:EKSpanThisEvent commit:YES error:&amp;err];
  </code></pre>
  
  <p>Have anyone observed this issue..</p>
  
  <p>Please suggest where I am going wrong..</p>
  
  <p>Thanks In Advance..!</p>