-
Notifications
You must be signed in to change notification settings - Fork 116
Open
Labels
questionFurther information is requestedFurther information is requested
Description
let formatter = ISO8601DateFormatter()
formatter.formatOptions = .withInternetDateTime
this formatOption restricts to RFC3339 format. That format requires timezone. Sometimes the timezone is not included, therefore results in error.
I manage to create a custom formatter instantiating
let formatter = ISO8601DateFormatter()
formatter.formatOptions = [.withColonSeparatorInTime, .withDashSeparatorInDate, .withFullDate, .withTime]
which supports strings without timezone, but for strings with timezone, the timezone is lost in the resulting date.
would be good that the parser will be more liberal in accepting date strings
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested