Hardware-dependent NSDateFormatter dateFromString: bug (returns nil)
I have several date strings that I need to convert to NSDates. My parsing code is the following: NSString *s = [pair objectForKey:@"nodeContent"]; NSDateFormatter *f = [[NSDateFormatter alloc] init]; [f setDateFormat:@"yyyy-MM-dd'T'HH:mm:ssZZ"]; self.date = [f dateFromString:s]; The above code works fine in all the devices and simulators we've tested. The strange thing is that when the above code runs on any iPhone 5 running iOS 6.1 or 7.0.x , the line self.date = [f dateFromString:s]; returns nil every time. I have checked and the string s exists and contains the same characters when compared