-[NSDateFormatter dateFromString:] is now finicky about extra string content

Originator:saibengottlieb
Number:rdar://8111096 Date Originated:6/19/10
Status:Open Resolved:
Product:iPhone Product Version:4.0
Classification:Serious Bug Reproducible:Always
 
Summary:
-[NSDateFormatter dateFromString:] fails if the string has extra content beyond the date.

Steps to Reproduce:

	NSDateFormatter     *formatter = [[NSDateFormatter alloc] init];
	[formatter setDateFormat: @"yyyy-MM-dd'T'HH:mm:ss"];
	NSDate     *result = [formatter dateFromString: @"2010-06-19T23:19:00+00:00"];

Expected Results:
      result should be a valid NSDate

Actual Results:
      result is nil

Regression:
    Works on OS 3.1.3

Notes:
    Trimming the string of the "+00:00" will enable the call to work. It appears that the formatter is no longer ignoring content beyond the format string

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!