We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e81f70f commit 394b977Copy full SHA for 394b977
Sources/OpenAPIRuntime/Conversion/Configuration.swift
@@ -34,7 +34,9 @@ public struct ISO8601DateTranscoder: DateTranscoder {
34
35
/// Creates and returns a date object from the specified ISO 8601 formatted string representation.
36
public func decode(_ dateString: String) throws -> Date {
37
- guard let date = ISO8601DateFormatter().date(from: dateString) else {
+ let fallbackFormatter = ISO8601DateFormatter()
38
+ fallbackFormatter.formatOptions = [.withFractionalSeconds, .withInternetDateTime]
39
+ guard let date = ISO8601DateFormatter().date(from: dateString) ?? fallbackFormatter.date(from: dateString) else {
40
throw DecodingError.dataCorrupted(
41
.init(
42
codingPath: [],
0 commit comments