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

Only support T as an allowed separator in RFC-3339 dates #3934

Merged
merged 1 commit into from
Dec 5, 2024

Conversation

drganjoo
Copy link
Contributor

@drganjoo drganjoo commented Dec 4, 2024

This PR modifies aws-smithy-types::DateTime to enforce the use of 'T' (or 't') as the date-time separator. A recent merge in the 'time' crate introduced support for space characters as separators. While ISO 8601 does allow spaces, RFC 3339 strictly requires 'T' (or 't') as the separator.

This change restores the behavior to match how it was before time = 0.3.37.

This PR also removes the temporary pinning of the time crate in protocol tests.

Copy link

github-actions bot commented Dec 4, 2024

A new generated diff is ready to view.

A new doc preview is ready to view.

@drganjoo drganjoo force-pushed the fahadzub/date-time-fix branch from fea5899 to d7cfb74 Compare December 4, 2024 10:23
Copy link

github-actions bot commented Dec 4, 2024

A new generated diff is ready to view.

A new doc preview is ready to view.

@drganjoo drganjoo marked this pull request as ready for review December 4, 2024 11:00
@drganjoo drganjoo requested review from a team as code owners December 4, 2024 11:00
("1985-04-12 23:20:50-02:00", AllowOffsets::OffsetsAllowed),
("1985-04-12a23:20:50-02:00", AllowOffsets::OffsetsAllowed),
];
for (date, offset) in test_cases.into_iter() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: these into_iter are unnecessary

@drganjoo drganjoo added this pull request to the merge queue Dec 5, 2024
Merged via the queue into main with commit 384f2ae Dec 5, 2024
43 of 44 checks passed
@drganjoo drganjoo deleted the fahadzub/date-time-fix branch December 5, 2024 11:39
landonxjames pushed a commit that referenced this pull request Dec 5, 2024
This PR modifies `aws-smithy-types::DateTime` to enforce the use of 'T'
(or 't') as the date-time separator. A [recent
merge](https://github.com/time-rs/time/pull/700/files#diff-78a73b9911c88961601784e674a20c89e7050de9f8763522bbaa88ed28311b51R524)
in the 'time' crate introduced support for space characters as
separators. While ISO 8601 does allow spaces, RFC 3339 strictly requires
'T' (or 't') as the separator.

This change restores the behavior to match how it was before `time =
0.3.37`.

This PR also removes the temporary pinning of the time crate in protocol
tests.

Co-authored-by: Fahad Zubair <fahadzub@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants