I want to convert a Date as a display string in the user\'s time zone, but I want to use 24 hour time format rather than 12 hour time format.
I know I can do that by exp
DateFormatter
has the dateFormat(fromTemplate:options:locale:)
method. Use this to get a proper 24-hour format based on the user's locale.
let fmt = DateFormatter.dateFormat(fromTemplate: "Hms", options: 0, locale: Locale.current)
Though this seems to return HH:mm:ss
for most locales. Only 85 of the 739 available locales return something other than HH:mm:ss
.