How to use ISO8601DateFormatter to convert a String to Date?
let iSO8601DateFormatter = ISO8601DateFormatter()
let string = iSO8601DateFormatter.string(from: Date()) //2019-12-04T08:23:27Z
let date = iSO8601DateFormatter.date(from: string) //nil ?
The code above run in iPhone8 simulator with Xcode 11.2.1, I get nil.
But it works in the Playground of same Xcode.
Can any one help me to point what's wrong about my doing?