Skip to content

temporal conversion functions cannot work on negative input properly #2325

Closed

Description

@viirya

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    arrowChanges to the arrow cratebug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions