Skip to content

Commit

Permalink
Explicitly convert result of pd.to_datetime to a timezone-naive type (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
spencerkclark authored and dcherian committed Jan 13, 2020
1 parent 1689db4 commit 59d3ba5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xarray/tests/test_coding_times.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ def test_cf_datetime_nan(num_dates, units, expected_list):
warnings.filterwarnings("ignore", "All-NaN")
actual = coding.times.decode_cf_datetime(num_dates, units)
# use pandas because numpy will deprecate timezone-aware conversions
expected = pd.to_datetime(expected_list)
expected = pd.to_datetime(expected_list).to_numpy(dtype="datetime64[ns]")
assert_array_equal(expected, actual)


Expand Down

0 comments on commit 59d3ba5

Please sign in to comment.