views:

54

answers:

0

According to the class reference, dateFromString method returns "A date representation of string interpreted using the receiver’s current settings". Using the following code:

NSDateFormatter * formatter = [[[NSDateFormatter alloc] init] autorelease];
[formatter setLocale:[[[NSLocale alloc] initWithLocaleIdentifier:@"en_US"] autorelease]];
[formatter setDateFormat:@"MMddyy"];
NSDate * date = [formatter dateFromString:@"2010-04-27T17:45:44.763"];

in SDK 3.1.3 returns nil, but on SDK 3.2 it returns 2010-01-20 00:00:00 -0300. Is the 3.2 version the correct behavior?