RRuleSwift
RRuleSwift copied to clipboard
Fixed the timezone related freeze
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