OfficeDev / Office-365-SDK-for-iOS

Microsoft Services SDKs for iOS Preview produced by MS Open Tech.
https://dev.office.com/
Other
96 stars 49 forks source link

StartTimeZone giving error #92

Closed siddheshcnaik closed 9 years ago

siddheshcnaik commented 9 years ago

We are getting forllowing error when we create a event using MSOutlookEventCollectionFetcher's add method.

Error Domain=Error in the Request Code=400 "(null)" UserInfo={error={ code = ErrorInvalidParameter; message = "The value 'Central Africa Time' of parameter 'StartTimeZone' is invalid."; }}

We are using NSString *timeZone = [[NSTimeZone localTimeZone] localizedName:NSTimeZoneNameStyleStandard locale:[NSLocale localeWithLocaleIdentifier:@"en_US"]]; for getting the timeZone string.

As per https://technet.microsoft.com/en-us/library/cc749073%28v=ws.10%29.aspx , are we allowed to use only a handful of values? Is so, can you have this integrated in the SDK itself?

Please help!

Thanks, Siddhesh

anihojnadel commented 9 years ago

Hi @siddheshcnaik,

We released a new version of the API with a new way to handle Dates and TimeZones, now you should use DateTimeTimeZone.

You can only use those values that are accepted for the api, you can check that within the api documentation (https://msdn.microsoft.com/office/office365/APi/complex-types-for-mail-contacts-calendar#DateTimeTimeZone)

Unfortunately, as we generate the SDK from a public metadata, we can't add anything that the metadata doesn't have (for example, the strings for the time zone).