It should be called 00:01:00 A.M., instead of 12:01:00 A.M. Shouldn't it?

import Foundation


let now = Date()

var dc = Calendar.current.dateComponents([.year, .month, .day], from: now)

dc.minute = 1

let date = Calendar.current.date(from: dc)

print(DateFormatter.localizedString(from: date!, dateStyle: .long,
timeStyle: .long))

// prints "August 29, 2016 at 12:01:00 AM GMT+8"


Zhaoxin
_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

Reply via email to