If Language is French and Region is Canada, the Languge & Region pane in Settings shows 24 hour time formatting in the sample area as expected, as does the rest of iOS and stock apps.
But if I create a simple SwiftUI app, 12 hour AM/PM formatting is still used.
struct ContentView: View {
var body: some View {
VStack {
Text("hourCycle: \(Locale.current.hourCycle.rawValue)")
Text(Date.now.formatted())
}
.padding()
}
}
If I set language to English and region to United Kingdom or other 24 hour time region, I get 24 hour formatting as expected:
If I use DateFormatter I see the same issue. Note that English-Canada uses AM/PM.
Is this developer error (me!) or a bug in iOS? I tried iOS15 (removing Locale.current.hourCycle as this is iOS16 only) and see the same issue.


