What is the appropriate way to format this string:
2012-07-28T23:59:00-06:00
This is the code I am using and the date formatter is currently setting the value of s.due_At to nil and both NSLogs are displaying null. I am getting the string above back from the dictionary for sure I have NSLogged it.
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setLocale:[NSLocale currentLocale]];
[dateFormatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ssZ"];
s.due_At = [dateFormatter dateFromString:[assignmentData objectForKey:@"due_at"]];
NSLog(@"%@",[dateFormatter stringFromDate:s.due_At]);
NSLog(@"%@",[dateFormatter dateFromString:[assignmentData objectForKey:@"due_at"]]);
How can I fix this to output the above string?