Revert "Use correct ISO 8601 date decoder"

This reverts commit 5da357ee9c.
This commit is contained in:
Shadowfacts 2019-09-26 18:39:48 -04:00
parent 5da357ee9c
commit 5ebf651f76
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 5 additions and 1 deletions

View File

@ -28,7 +28,11 @@ public class Client {
lazy var 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
}()