Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify a locale of en_US_POSIX to avoid localization problems in certain situations #18

Merged
merged 1 commit into from
Sep 4, 2013

Conversation

carllindberg
Copy link
Contributor

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.

Whoops, I didn't see the existing pull request. If they managed to get a unit test, that is better, but I think it is missing another place where the locale could be specified.

…tain 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.
@boredzo boredzo merged commit 7c9907f into boredzo:master Sep 4, 2013
@boredzo
Copy link
Owner

boredzo commented Sep 4, 2013

The merge commit: 738a614

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants