I have tried multiple date formats, but still I get nil back:
Thu May 24 15:51:48 EEST 2012
[formatter setDateFormat:@"E MMM d H:mm:ss z yyyy"];
It is crazy, on my iPhone 3Gs it works, and on a 4S it returns null. They are both set to the same Time Zone.
Maybe the format is wrong, I don’t understand what I do wrong.
Thank you.
First of make sure that you set the local of the
NSDateFormatter, else the parsing wil not work on systems where the os language is not set to english.The reason why it might not parse is because the time is 24 (HH):