In Swift 3 I am not able to change the day by adding minutes to a day. The time changes like its supposed to but the day does not change, for example adding 180 minutes to 31.10.2016 2200 leads to 31.10.2016 0100 and not to 01.11.2016 0100.
func getDayByAddingMinutes(date: String, minutes: Int) -> String{
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "dd.MM.yyyy hh:mm"
let calendar = Calendar.current
let akt = (dateFormatter.date(from: date)! as Date?)!
let calculatedDate = calendar.date(byAdding: .minute, value: minutes, to: akt )
print("\(akt) + \(minutes)")
let dateFormatter2 = DateFormatter()
dateFormatter2.dateFormat = "dd.MM.yyyy"
let newDate = dateFormatter2.string(from: calculatedDate!);
print("\(date) + \(newDate)")
return "\(newDate)";
}