Parsing date in Objective

How can I parse this into an objective-c NSDate most efficiently?

"2010-07-13T11:22:33-07:00"

This is what I tried

NSDateFormatter *format = [[NSDateFormatter alloc] init];
[format setDateFormat:@"yyyy-MMM-dd'T'HH:mm:ssZ"];

but did not work


have a look here, i had that issue

"The format that I am being given is halfway between RFC 822 and GMT. if i change the "+00:00" to "+0000" then I can use the "Z" on my format. and if i change it to "GMT+00:00" then I can use ZZZZ to get the data properly. It seems that something has been stripped out to handle this hybrid as it was working for me before with OS 3.x"

链接地址: http://www.djcxy.com/p/5996.html

上一篇: 如何解析日期字符串到iOS中的NSDate对象?

下一篇: 在Objective中解析日期