Skip to content

switch from chrono crate to time crate#965

Merged
cataggar merged 14 commits intoAzure:mainfrom
ctaggart:time2
Aug 2, 2022
Merged

switch from chrono crate to time crate#965
cataggar merged 14 commits intoAzure:mainfrom
ctaggart:time2

Conversation

@ctaggart
Copy link
Contributor

@ctaggart ctaggart commented Aug 1, 2022

The time crate has been well maintained and offers a better API than chrono. The time::OffsetDateTime type is similar to .NET's System.DateTimeOffset. chrome::Duration has been replaced by std::time::Duration. A new azure_core::date module contains functions for parsing and formatting formats and creating new durations.

The Azure REST API Specifications use either "format": "date-time" or "format": "date-time-rfc1123". These correspond to RFC 3339 and RFC 1123 date formats. The pull request replaces usage of RFC 2822 with RFC 1123 where the zone must be GMT.

Copy link
Contributor

@rylev rylev left a comment

Choose a reason for hiding this comment

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

All and all looks good. I just have a few concerns.

@cataggar cataggar requested a review from rylev August 1, 2022 18:51
@cataggar
Copy link
Member

cataggar commented Aug 1, 2022

@rylev, thanks for the review! All your requested changes have been made.

Copy link
Contributor

@rylev rylev left a comment

Choose a reason for hiding this comment

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

This is a pretty big change so I didn't go through every line with a fine-tooth comb, but overall, it looks like a solid change.

@ctaggart ctaggart deleted the time2 branch September 7, 2022 22:04
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