DateFormat不返回“HH:mm:SS”的日期
func mapping(map: Map) { time <- (map["time"], TransformOf<Date, String>(fromJSON: { let dateFormatter = DateFormatter() dateFormatter.dateFormat = "HH:mm:ss" //dateFormatter.timeZone = TimeZone(abbreviation: "EEST") if let argument = $0 { let date = dateFormatter.date(from: argument) return dateFormatter.date(from: argument) } return nil }}
$0
"22:12:00"
编辑
EDIT 2
慕哥6287543