diff --git a/cpp/src/arrow/flight/types.h b/cpp/src/arrow/flight/types.h index b6309d0af2a71..8b612bd55ce91 100644 --- a/cpp/src/arrow/flight/types.h +++ b/cpp/src/arrow/flight/types.h @@ -80,7 +80,8 @@ class FlightServerBase; /// > all minutes are 60 seconds long, i.e. leap seconds are "smeared" /// > so that no leap second table is needed for interpretation. Range /// > is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. -using Timestamp = std::chrono::system_clock::time_point; +using Timestamp = + std::chrono::time_point; /// \brief A Flight-specific status code. Used to encode some /// additional status codes into an Arrow Status. diff --git a/python/pyarrow/tests/test_flight.py b/python/pyarrow/tests/test_flight.py index 14432de60486b..063bc0a8fd569 100644 --- a/python/pyarrow/tests/test_flight.py +++ b/python/pyarrow/tests/test_flight.py @@ -1167,19 +1167,9 @@ def test_flight_get_info(): assert info.endpoints[0].expiration_time is None assert info.endpoints[0].app_metadata == b"" assert info.endpoints[0].locations[0] == flight.Location('grpc://test') - # on macOS, system_clock::duration is milliseconds - # on Windows, system_clock::duration is 100 nanoseconds - # on Linux, system_clock::duration is nanoseconds - ts = None - if pa._platform.system() == 'Darwin': - ts = "2023-04-05T12:34:56.789012000+00:00" - elif pa._platform.system() == 'Windows': - ts = "2023-04-05T12:34:56.789012300+00:00" - elif pa._platform.system() == 'Linux': - ts = "2023-04-05T12:34:56.789012345+00:00" - if ts is not None: - assert info.endpoints[1].expiration_time == \ - pa.scalar(ts).cast(pa.timestamp("ns", "UTC")) + assert info.endpoints[1].expiration_time == \ + pa.scalar("2023-04-05T12:34:56.789012345+00:00") \ + .cast(pa.timestamp("ns", "UTC")) assert info.endpoints[1].app_metadata == b"endpoint app metadata" assert info.endpoints[1].locations[0] == \ flight.Location.for_grpc_tcp('localhost', 5005)