swift-aws-lambda-events icon indicating copy to clipboard operation
swift-aws-lambda-events copied to clipboard

Extend date parsing implementation

Open sebsto opened this issue 11 months ago • 8 comments

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.

sebsto avatar Dec 19 '24 19:12 sebsto

@t089 do you have time to give a look at this ?

sebsto avatar Dec 19 '24 19:12 sebsto

@adam-fowler do you have a link to a list of time zones that we should support?

t089 avatar Dec 19 '24 21:12 t089

This one?

https://www.rfc-editor.org/rfc/rfc822.html#section-5.1

t089 avatar Dec 19 '24 21:12 t089

The same list is included in the later rfc's

adam-fowler avatar Dec 20 '24 06:12 adam-fowler

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?

t089 avatar Dec 20 '24 07:12 t089

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?

That certainly is an option.

adam-fowler avatar Dec 20 '24 07:12 adam-fowler

@adam-fowler do you have a strong need / opinion to keep this open or can I close as suggested by Tobias ?

sebsto avatar Jun 30 '25 19:06 sebsto

will not fix, unless needed by a customer.

sebsto avatar Oct 21 '25 04:10 sebsto