Modern Apps git

← xtool.git

Fix DeveloperServices v1 API not decoding dates in some locales

Commit
39c10140229338124e9cf780ee72318288d7596b
Author
kabiroberai <[email protected]>
When
2021-02-03 22:36 UTC (5 years ago)
Parents
f41063d

Diff

Supersign/DeveloperServices/DeveloperServicesAPIVersion.swift
diff --git a/Supersign/DeveloperServices/DeveloperServicesAPIVersion.swift b/Supersign/DeveloperServices/DeveloperServicesAPIVersion.swiftindex 68ebb6e..246b53f 100644--- a/Supersign/DeveloperServices/DeveloperServicesAPIVersion.swift+++ b/Supersign/DeveloperServices/DeveloperServicesAPIVersion.swift@@ -147,6 +147,8 @@ public struct DeveloperServicesAPIVersionV1: DeveloperServicesAPIVersion {         let decoder = JSONDecoder()         let formatter = DateFormatter()         formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZ"+        formatter.calendar = Calendar(identifier: .iso8601)+        formatter.locale = Locale(identifier: "en_US_POSIX")         decoder.dateDecodingStrategy = .formatted(formatter)         return decoder     }()