I'm have a problem with date formatting in iOS 9, it works ok with iOS 8 and also it works when I'm testing it in simulator with iOS 9, but when a test it on real device with iOS 9 I'm getting null. Below is code that I'm using
NSLog(@"String Date: '%@'", stringDate);
NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
[dateFormat setDateFormat:@"MM/dd/yyyy hh:mm:ss a"];
NSDate *date = [dateFormat dateFromString:stringDate];
NSLog(@"Date: %@", date);
In log I'm getting:
String Date: '8/29/2015 4:13:39 PM'
Date: (null)
Also if I use uppercase h (H or HH) I'm always getting that hour is 10.
Try setting locale on your date formatter.
From Apple Documentation:
EDIT: Swift Version