You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CBL-7429 : Swift Codable decoding fails for some ISO8601 formats (Port) (#3450)
* Port the fix from release/3.2 branch for CBL-7061.
* Fix Codable ISO8601 format
* Add test to decode Swift ISO8601 default format
* Co-authored-by: callumbirks <[email protected]>
iflet date =ISO8601DateFormatter().date(from: string){
331
+
iflet date =ISO8601DateFormatter.couchbase.date(from: string){
332
+
return date
333
+
}elseiflet date =ISO8601DateFormatter().date(from: string){
334
+
// CBL-7061. Because of an issue introduced in 3.2.3 which used the default formatter for dates, some customers may have dates in their documents which are
335
+
// encoded using the default formatter (rather than the `.couchbase` formatter).
336
+
// We can remove this extra check once we are sure no customers have default formatter dates in their databases.
332
337
return date
333
338
}else{
334
339
throwCBLError.create(CBLError.decodingError, description:"Failed to parse ISO8601 Date from '\(string)'")
0 commit comments