diff --git a/python/pyarrow/tests/test_compute.py b/python/pyarrow/tests/test_compute.py index 4b58dc65bae9b..98cbd920b509b 100644 --- a/python/pyarrow/tests/test_compute.py +++ b/python/pyarrow/tests/test_compute.py @@ -3214,8 +3214,7 @@ def test_list_element(): def test_count_distinct(): - seed = datetime.datetime.now() - samples = [seed.replace(year=y) for y in range(1992, 2092)] + samples = [datetime.datetime(year=y, month=1, day=1) for y in range(1992, 2092)] arr = pa.array(samples, pa.timestamp("ns")) assert pc.count_distinct(arr) == pa.scalar(len(samples), type=pa.int64())