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

DateTime::from_secs_f64 can panic #3805

Closed
rcoh opened this issue Aug 27, 2024 · 0 comments
Closed

DateTime::from_secs_f64 can panic #3805

rcoh opened this issue Aug 27, 2024 · 0 comments

Comments

@rcoh
Copy link
Collaborator

rcoh commented Aug 27, 2024

    #[test]
    fn panic_in_fromsecs_f64() {
        let date = DateTime::from_secs_f64(-1.95877825437922e-309);
    }
github-merge-queue bot pushed a commit that referenced this issue Aug 29, 2024
## Motivation and Context
- #3805 

## Description
Recover from floating point values extremely close to whole numbers by
incrementing the epoch seconds value.

## Testing
- proptest

## Checklist
<!--- If a checkbox below is not applicable, then please DELETE it
rather than leaving it unchecked -->
- [x] For changes to the smithy-rs codegen or runtime crates, I have
created a changelog entry Markdown file in the `.changelog` directory,
specifying "client," "server," or both in the `applies_to` key.
- [x] For changes to the AWS SDK, generated SDK code, or SDK runtime
crates, I have created a changelog entry Markdown file in the
`.changelog` directory, specifying "aws-sdk-rust" in the `applies_to`
key.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
@rcoh rcoh closed this as completed Aug 29, 2024
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

No branches or pull requests

1 participant