【Xcode/Swift】秒数を時間に変更する方法

let timeInterval = 124.04521142

let formatter = DateFormatter()
formatter.dateFormat = "mm:ss"

let targetDate = Date(timeIntervalSinceReferenceDate: timeInterval)
let str = formatter.string(from: targetDate)
print(str)