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

Fixed the timezone related freeze #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sunnymango
Copy link

@sunnymango sunnymango commented Jun 20, 2018

Problem: The DateFormatter has a feature that will add the AM/PM to any formatted string (even if the format doesn't include AM/PM) if the user sets his/her phone to a 24-hour region, like Great Britain, and then toggle on the 24-Hour Time switch, and then toggle off.

Solution: Use a region that is not broken, for example the US region in a safe init method.

Reference: https://stackoverflow.com/questions/6613110/what-is-the-best-way-to-deal-with-the-nsdateformatter-locale-feechur

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.

1 participant