I’m dealing with times formats in Restkit, I have a web service that returns to me objects in JSON format, I have no problem parse the objects I receive in exception on the date that comes in this format:
"date_expiration":"2012-04-22T11:33:28+0200"
I read some posts about it and I have understand that rest kit don’t have this format to parse the date so I have to add a new format. So I do it with this code:
[RKManagedObjectMapping addDefaultDateFormatterForString:@"yyyy-MM-ddTHH:mm:ssT" inTimeZone:nil];
But it don’t works. I have read a very useful web page about time formatters:
http://waracle.net/mobile/iphone-nsdateformatter-date-formatting-table/
Hear it shows how to format a date but it’s two things I don’t know how to do: How I jump the character T before the hours? For this time zone T is the correct code? Thanks for your help
The T in the date is a separator. It has to be put in
' 'The specifier for the timezone is Z