title: NSDateFormatter is giving one day ahead date
body: <p>I am using below code, but it gives me one day ahead date .</p>
  
  <p><strong>Example</strong>: passing input string as "<em>2013-08-31T23:59:59-0400</em>" and out put date is coming as "<em>2013-09-01 03:59:59 +0000</em>".</p>
  
  <pre><code>NSDateFormatter *formatter = [self railsDateFormatter];
  NSDate *date = [formatter dateFromString:dateString];
  
  +(NSDateFormatter*)railsDateFormatter
  {
      NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
      [formatter setDateFormat:@"YYYY-MM-dd'T'HH:mm:ssZ"];
      NSLocale *locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"];
      [formatter setLocale:locale];
      return formatter;
  }
  </code></pre>
  
  <p>Thank you .</p>