forked from shadowfacts/Tusker
Revert "Use correct ISO 8601 date decoder"
This reverts commit 5da357ee9c
.
This commit is contained in:
parent
5da357ee9c
commit
5ebf651f76
|
@ -28,7 +28,11 @@ public class Client {
|
||||||
|
|
||||||
lazy var decoder: JSONDecoder = {
|
lazy var decoder: JSONDecoder = {
|
||||||
let decoder = JSONDecoder()
|
let decoder = JSONDecoder()
|
||||||
decoder.dateDecodingStrategy = .iso8601
|
let formatter = DateFormatter()
|
||||||
|
formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SZ"
|
||||||
|
formatter.timeZone = TimeZone(abbreviation: "UTC")
|
||||||
|
formatter.locale = Locale(identifier: "en_US_POSIX")
|
||||||
|
decoder.dateDecodingStrategy = .formatted(formatter)
|
||||||
return decoder
|
return decoder
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue