How to reproduce the bug:
- Set iPhone Language to English.
- Set iPhone Language to Deutsch.
- Turn the "24-Hour Time" switch off.
- Turn the "24-Hour Time" switch on.
- Create the empty project with "Sing View App" template.
- Paste the following code: print(DateFormatter.localizedString(from: Date(), dateStyle: .none, timeStyle: .short)).
- Build and run the project. The output will be in 12-Hour Format. At this time the func is ignoring the "24-Hour Time" switch in the Settings.
- Set iPhone Language to English.
- Turn the "24-Hour Time" switch on.
- Set iPhone Language to Deutsch.
- Run the project. The output will be in 24-Hour Format. At this time the func result is correct.
- Turn the "24-Hour Time" switch off.
- Turn the "24-Hour Time" switch on.
- Run the project. The output will be in 12-Hour Format. At this time the func result is incorrect.