From 5da357ee9cc12d5f59a5f89bdb166d0f9b29f893 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Tue, 24 Sep 2019 14:53:35 -0400 Subject: [PATCH] Use correct ISO 8601 date decoder --- Pachyderm/Client.swift | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Pachyderm/Client.swift b/Pachyderm/Client.swift index 895a0c37d1..8717680c3a 100644 --- a/Pachyderm/Client.swift +++ b/Pachyderm/Client.swift @@ -28,11 +28,7 @@ public class Client { lazy var decoder: JSONDecoder = { let decoder = JSONDecoder() - 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) + decoder.dateDecodingStrategy = .iso8601 return decoder }()