-
Notifications
You must be signed in to change notification settings - Fork 72
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
Add support for time
v0.3 types
#450
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This includes implementations of the Duration*Seconds and Timestamp*Seconds types. The Timestamp*Seconds converters are implemented for both `PrimitiveDateTime` and `OffsetDateTime`. It also includes the well-known format specifiers `Rfc2822` and `Rfc3339` as converters for `OffsetDateTime`: #[serde_as(as = "Rfc2822")] datetime: OffsetDateTime, Simple tests are included.
* Add a simple module documentation, similar to the chrono one. * Describe the new feature flag. * Update the documentations for the Timestamp* and Duration* types, both where they are defined and in the transformations list. * Add new transformations for the well-known Rfc2822 and Rfc3339 types.
The `time` dependency requires Rust 1.53. Bump the MSRV to support this. This allows removing some work-arounds for older Rust versions. It drops support for versions without const-generics and the old array implementations.
Codecov Report
@@ Coverage Diff @@
## master #450 +/- ##
==========================================
+ Coverage 70.96% 71.87% +0.90%
==========================================
Files 52 54 +2
Lines 3465 3634 +169
==========================================
+ Hits 2459 2612 +153
- Misses 1006 1022 +16
Continue to review full report at Codecov.
|
bors merge |
Build succeeded: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add support for the
time
crate v0.3.time::Duration
withDuration*Second
.time::OffsetDateTime
andtime::PrimitiveDateTime
withTimestamp*Seconds
.Rfc2822
andRfc3339
into conversion type, such that they can be used inside collections.Todo: