I have a time zone formatted like this in an incoming string which I have no control over (it comes in a dictionary from server)
tzHours = NSString * @"+01:00"
But I need to convert it into a NSTimeZone
so I can format a date
NSString *date = [dateDictionary safeObjectForKey:@"date"];
NSString *time = [dateDictionary safeObjectForKey:@"time"];
NSString *tzHours = [dateDictionary safeObjectForKey:@"timeZone"];
// Format the date based off the timezone
NSDateFormatter *formatter = [self _apiDateFormatterWithTimeZone:[NSTimeZone timeZoneForSecondsFromGMT:0]];
But I am unsure how to do this.
Is there a good way to do handle this?
Many thanks