views:

232

answers:

2

Hello,

until now I used date formatter the following way with string like '2010-06-10T11:50:01+02:00':

    NSDateFormatter* dateFormatter = [[[NSDateFormatter alloc] init] autorelease];
[dateFormatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ssZ"];
NSDate *from = [dateFormatter dateFromString:[NSString stringWithString:fromStr]];  

That was working correctly. Now that I am testing on OS4.0, it's not working anymore. The NSDate created (from) is null.

Any explanation ?

Thanks a lot, Luc

A: 

Show how you define (and set) your fromStr variable. (The actual code.)

Lori
Hello. fromStr variable is retrieved from a HttpRequest response. This is only a NSString that I defined like this: fromStr = @"2010-06-10T11:50:01+02:00".I had a look at the post Brad Larson talked about and I found my solution there. Seems something has changed between 3.1.3 and 4.0. Thanks, Luc
Luc
A: 

Just to mark this question as answered by comment of Brad Larson.

Luc