Skip to content

Commit 6ecd861

Browse files
author
MarcoGorelli
committed
fixup test
1 parent 7405509 commit 6ecd861

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

pandas/core/tools/datetimes.py

-9
Original file line numberDiff line numberDiff line change
@@ -1016,15 +1016,6 @@ def to_datetime(
10161016
Index([2020-10-25 02:00:00+02:00, 2020-10-25 04:00:00+01:00],
10171017
dtype='object')
10181018
1019-
- A mix of timezone-aware and timezone-naive inputs is converted to
1020-
a timezone-aware :class:`DatetimeIndex` if the offsets of the timezone-aware
1021-
are constant:
1022-
1023-
>>> from datetime import datetime
1024-
>>> pd.to_datetime(["2020-01-01 01:00 -01:00", datetime(2020, 1, 1, 3, 0)])
1025-
DatetimeIndex(['2020-01-01 01:00:00-01:00', '2020-01-01 02:00:00-01:00'],
1026-
dtype='datetime64[ns, pytz.FixedOffset(-60)]', freq=None)
1027-
10281019
|
10291020
10301021
Setting ``utc=True`` solves most of the above issues:

pandas/tests/io/xml/test_xml_dtypes.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ def test_day_first_parse_dates(parser):
457457
)
458458

459459
with tm.assert_produces_warning(
460-
UserWarning, match="Parsing dates in DD/MM/YYYY format"
460+
UserWarning, match="Parsing dates in %d/%m/%Y format"
461461
):
462462
df_result = read_xml(xml, parse_dates=["date"], parser=parser)
463463
df_iter = read_xml_iterparse(

0 commit comments

Comments
 (0)