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

temporal conversion functions cannot work on negative input properly #2325

Closed
viirya opened this issue Aug 4, 2022 · 0 comments · Fixed by #2326
Closed

temporal conversion functions cannot work on negative input properly #2325

viirya opened this issue Aug 4, 2022 · 0 comments · Fixed by #2326
Labels
arrow Changes to the arrow crate bug

Comments

@viirya
Copy link
Member

viirya commented Aug 4, 2022

Describe the bug

timestamp_ns_to_datetime(-1) gets "invalid or out-of-range datetime" error. Other functions expect to have same issue too.

d

To Reproduce

#[test]
fn negative_input_timestamp_ns_to_datetime() {
  timestamp_ns_to_datetime(-1);
}
---- temporal_conversions::tests::negative_input_timestamp_ns_to_datetime stdout ----
thread 'temporal_conversions::tests::negative_input_timestamp_ns_to_datetime' panicked at 'invalid or out-of-range datetime', ...
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Expected behavior

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants