-
-
Notifications
You must be signed in to change notification settings - Fork 49
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 crate for integration with the AWS SDK for Rust #260
base: master
Are you sure you want to change the base?
Conversation
8c795d0
to
8a8cdbc
Compare
Wouldn't this be better in aws_smithy_types_convert like the |
I created a PR for that previously, but they didn't want to add it since jiff isn't stable yet. |
Ref smithy-lang/smithy-rs#3826 I'll get to reviewing this soon, after I get through the batch of changes related to core-only work. |
No, worries.... it is just some simple convenience helpers, so it is not like my code is dependent on this :) |
The nanosecond portion of a jiff Timestamp are negative for times before the Unix epoch (it ranges between +1s and -1s), this should be taken into account (e.g. the type casts between u32 and i32 are incorrect). |
The smithy datetime is defined as seconds and nano seconds since unix epoch, so a simple check for that should fix this. I will have a look at it later. |
@fiadliel Ok, it seems that I was wrong about DateTime being only positive. But I have added nano second conversions for times before epoc. Please have a look and see if it looks correct to you. I checked for conversion the other way also, but that seems to be handled by jiff automatically. |
I have implemented some basic conversion from the AWS Smithy type
DateTime
into/fromTimestamp
andZoned
.