Will changing an events Time-Zone affect other people on shared events?

338 views Asked by At

If I were to normalize an EKEvent 's startDate property using a NSDateFormatter and setting the time zone with

NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
[formatter setDateFormat:@"hh:mm a"];
[formatter setTimeZone:[NSTimeZone systemTimeZone]];

 event.startDate = [formatter dateFromString:[NSString stringWithFormat:@"%@", [event.startDate]]];

and I later make a change to that event requiring me to call

[self.event.eventStore saveEvent:currentEvent span:EKSpanThisEvent commit:YES error:nil];

Would it override the time-zone on the server, causing issues for the person (whom uses GCal) in another state that originally created that shared calendar event, or is it just a local change?

If it does affect the event, what is the best way for me to make sure the events on the app side always represent the users current time zone, without having to change format the event each time I refer to it on the UI?

1

There are 1 answers

6
atomkirk On BEST ANSWER

Yes the timezone of an event will sync. If an event happens at 9 Mountain time, the event will be displayed as occurring at 9 to anyone whos devices general setiings is set to mountain time. If their device is eastern time, the event will appear to occur at 7. If you change the time zone of the event to Eastern, devices in mountain time will now see the event occurring at 11, and eastern time devices will see the event occurring at 9. So, changing the time zone does not change the time it occurs in its own time zone, but it will change it relative to where you moved it from.

You can do 2 things after asking the user when the event occurs: 1) you can assume the event occurs in the users devices current time zone. 2) you can ask them where the event occurs and set the events time zone to that.

If you have an event with the wrong time, you should first set its time zone to where the event is actually happening, then change when it occurs to when it actually happens, where it actually happens.

If you just focus on getting the data on the event set correctly, it will appear correctly on everyones device who is sharing the calendar with you.