Code: Select all
import Foundation
let date = try! Date("2023-07-25T16:23:00Z", strategy: .iso8601)
print(date.formatted(.dateTime.hour(.twoDigits(amPM: .omitted)).minute()))
// Produces: 05:23
< /code>
Ich bin in Großbritannien und derzeit in BST, also wird für eine Eingabe von 16:23 Uhr um 17:23 Uhr erwartet. [url=viewtopic.php?t=14917]Ich möchte[/url] die Ausgabe als 17:23
Code: Select all
DateFormatter