I need to check on dates for certain items. I'm reading a string from a JSON file that looks like:
"revisionDate":"2013-08-28T13:07:53+00:00"
When I try to format it
NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
[dateFormat setDateFormat:@"yyyy-MM-d HH:mm:ssZ"];
NSDate *date = [dateFormat dateFromString:revisionDateTime];
date
is always nil. I think this is because of that T
that's in that timestamp string. I don't know how to handle it, and there doesn't seem to be any mention how (at least that I can find), in the reference I'm using.
Any ideas on how I can handle this?