Try modifying the NSDateFormatter
instance to account for the T
:
[dateFormat setDateFormat:@"yyyy-MM-dd T HH:mm:ssZZZZ"];
You may also want to consider encapsulating literal string values (in this case, dashes, spaces, colons, and the T
) between quotes:
[dateFormat setDateFormat:@"yyyy'-'MM'-'dd'T'HH':'mm':'ssZZZZ"]