title: Converting ISO8601 Date Format to local time (iOS)
body: <p>So there is a section on web application that users can enter events into and the web service sends those events to the mobile app in the following format:</p>
  
  <pre><code>"yyyy-MM-dd'T'HH:mm:ssZZZZZ"
  </code></pre>
  
  <p>I'm having issues trying to convert the string into a date so I can get just the time from the event (formatted in the correct timezone as well), So for example here's one that comes over "2015-03-20T20:00:00-07:00", which when I pull the time should be 1PM Pacific Time. But instead I either get 8PM or 3AM (depending on whether I add UTC abbreviation to the date formatter).</p>
  
  <p>Here's what I have so far, I know I'm missing something here &amp; maybe there's another date formatter that needs to be used but so far I can't figure out where I'm going wrong. </p>
  
  <pre><code>NSString *datePattern = @"yyyy-MM-dd'T'HH:mm:ssZZZZZ";
  NSDateFormatter *dateFormatter = [NSDateFormatter new];
  [dateFormatter setDateFormat:datePattern];
  NSString *sString = [valueDict valueForKey:@"start_date"];
  NSDate *startDate = [dateFormatter dateFromString:sString];
  NSDateFormatter *timeFormatter = [NSDateFormatter new];
  [timeFormatter setDateFormat:@"hh:mm a"];
  [timeFormatter setLocale:[NSLocale systemLocale]];
  NSString *timeString = [timeFormatter stringFromDate:startDate];
  </code></pre>