Skip to content

armgit / xtool

Public Imported from GitHub
0

Cross-platform Xcode replacement. Build and deploy iOS apps with SwiftPM on Linux, Windows, macOS.

Fix DeveloperServices v1 API not decoding dates in some locales

kabiroberai39c101402293
diff --git a/Supersign/DeveloperServices/DeveloperServicesAPIVersion.swift b/Supersign/DeveloperServices/DeveloperServicesAPIVersion.swift
index 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
}()