Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(smithy-client): parse datetime offsets #4379

Merged
merged 1 commit into from
Jan 30, 2023

Conversation

srchase
Copy link
Contributor

@srchase srchase commented Jan 26, 2023

Issue

Issue number, if available, prefixed with "#"

Description

smithy-lang/smithy#1502 introduced protocol test coverage for datetimes with offsets for clients.

This PR adds a parseRfc3339DateTimeWithOffset function to handle positive and negative offsets.

For now, the function is unused by any clients.

Testing

This was tested in conjunction with smithy-typescript changes to use the parseRfc3339DateTimeWithOffset function in place of the existing parseRfc3339DateTime function for clients. parseRfc3339DateTime is retained for servers. yarn generate-clients && yarn test:protocols was successfully run.

The smithy-typescript changes will be paired with codegen changes to use the new parsing function within clients.

Additional context

Add any other context about the PR here.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@srchase srchase requested review from a team as code owners January 26, 2023 23:22
@srchase srchase marked this pull request as draft January 27, 2023 00:14
@srchase srchase force-pushed the datetime-with-offsets branch 3 times, most recently from c44c21b to 3c7a777 Compare January 27, 2023 22:56
@srchase srchase marked this pull request as ready for review January 27, 2023 23:18
packages/smithy-client/src/date-utils.spec.ts Outdated Show resolved Hide resolved
packages/smithy-client/src/date-utils.spec.ts Outdated Show resolved Hide resolved
packages/smithy-client/src/date-utils.spec.ts Outdated Show resolved Hide resolved
@srchase srchase force-pushed the datetime-with-offsets branch from 3c7a777 to 319e456 Compare January 30, 2023 16:34
@srchase srchase force-pushed the datetime-with-offsets branch from 319e456 to 86ee3e2 Compare January 30, 2023 16:37
@srchase srchase merged commit c1d323b into aws:main Jan 30, 2023
@srchase srchase deleted the datetime-with-offsets branch January 30, 2023 18:37
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants