Extend date parsing implementation
As a follow up to https://github.com/swift-server/swift-aws-lambda-events/pull/81
Given this is being used with more than HTTP headers I think we need to extend the number of timezone identifiers. The list is missing standard ones listed in RFC PST, EST, MST, CST (funnily RFC only lists US zones). Also does the parser deal with additional characters at the en. It is common to see email dates written as follows Sun, 22 Sep 2024 18:46:31 +0100 (BST) with the three character timezone at the end.
@t089 do you have time to give a look at this ?
@adam-fowler do you have a link to a list of time zones that we should support?
This one?
https://www.rfc-editor.org/rfc/rfc822.html#section-5.1
The same list is included in the later rfc's
Not sure how much value it is to add those but not any other from the rest of the world. If we want to make truly general purpose date parser, we would need ICU data... Maybe for SES, we should not parse the Date header instead, and leave this exercise to the user?
Not sure how much value it is to add those but not any other from the rest of the world. If we want to make truly general purpose date parser, we would need ICU data... Maybe for SES, we should not parse the
Dateheader instead, and leave this exercise to the user?
That certainly is an option.
@adam-fowler do you have a strong need / opinion to keep this open or can I close as suggested by Tobias ?
will not fix, unless needed by a customer.