Specify a locale of en_US_POSIX to avoid localization problems in certain situations, documented by Apple at https://developer.apple.com/library/ios/qa/qa1480/_index.html .  This was seen in testing with iOS, when using a British English current locale and choosing a 12-hour date preference in Settings.  NSDateFormatter actually rewrote the format to output "hh a" despite the request to print out "HH".  Using the POSIX locale ensures the output is not subject to user preferences, which is desired when printint out an ISO6801 compliant format.
Specify a locale of en_US_POSIX to avoid localization problems in certain situations, documented by Apple at https://developer.apple.com/library/ios/qa/qa1480/_index.html .  This was seen in testing with iOS, when using a British English current locale and choosing a 12-hour date preference in Settings.  NSDateFormatter actually rewrote the format to output "hh a" despite the request to print out "HH".  Using the POSIX locale ensures the output is not subject to user preferences, which is desired when printint out an ISO6801 compliant format.