Swift bunu yapabilirsiniz Swift 3'te 3,0
// *** Create date ***
let date = NSDate()
// *** create calendar object ***
var calendar = NSCalendar.current
// *** Get components using current Local & Timezone ***
print(calendar.dateComponents([.year, .month, .day, .hour, .minute], from: date as Date))
// *** define calendar components to use as well Timezone to UTC ***
let unitFlags = Set<Calendar.Component>([.hour, .year, .minute])
calendar.timeZone = TimeZone(identifier: "UTC")!
// *** Get All components from date ***
let components = calendar.dateComponents(unitFlags, from: date as Date)
print("All Components : \(components)")
// *** Get Individual components from date ***
let hour = calendar.component(.hour, from: date as Date)
let minutes = calendar.component(.minute, from: date as Date)
let seconds = calendar.component(.second, from: date as Date)
print("\(hour):\(minutes):\(seconds)")
Ayrıca bkz [Bu cevap] (http: // stackoverflow com/a/33343958/3681880). – Suragch
Olası çoğaltılabilir [Geçerli zamanın tarih bilgisi olarak nasıl alınır] (http://stackoverflow.com/questions/24070450/how-to-get-the-current-time-as-datetime) – Moritz