title: Why NSDateFormatter can not parse date from ISO 8601 format
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/5185230/converting-an-iso-8601-timestamp-into-an-nsdate-how-does-one-deal-with-the-utc">Converting an ISO 8601 timestamp into an NSDate: How does one deal with the UTC time offset?</a>  </p>
  </blockquote>
  
  
  
  <p>I use rails as backend, the default date output is 2008-12-29T00:27:42-08:00</p>
  
  <p>But after my research NSDateFormatter can not support it, except I change date out to 2008-12-29T00:27:42-0800</p>
  
  <p>Here is the code I used to parse ISO 8601 date, but it's not work</p>
  
  <pre><code>NSDateFormatter* dateFormatter = [[[NSDateFormatter alloc] init] autorelease];
  [dateFormatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ssZ"];
  NSLog(@"%@", [dateFormatter dateFromString:@"2008-12-29T00:27:42-08:00"]);
  </code></pre>
  
  <p>Any ideas?</p>