Fixed format date sample code is confusing due to redundancy

Number:rdar://37152952 Date Originated:02-Feb-2018 01:58 pm
Status:Open Resolved:
Product:Documentation Product Version:N/A
Classification:Enhancement Reproducible:Always
The NSDateFormatter documentation under ‘Working With Fixed Format Date Representations’ sets a dateFormat specifying a time zone, and also sets the timeZone property. This is redundant. The timeZone property is not used in this case.

You can see this by running that code and commenting out the line setting the timeZone.

Steps to Reproduce:
Look at the code sample at

Expected Results:
This code sample should not set the timeZone property.

Actual Results:
This example sets the timeZone property even though doing so does nothing. This makes the example confusing.


Related: rdar://37152907 Documentation for NSDateFormatter timeZone is misleading


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at 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!