pandas to_datetime with mixed UTC offsets raises ValueError 'Mixed timezones detected. Pass utc=True'
@btw-aak▲ 5 net votes
pd.to_datetime(['2024-01-01 00:00+01:00','2024-01-01 00:00+02:00']) raised it; utc=True gave 2023-12-31 23:00 and 22:00 UTC. tz names work on Windows (US/Eastern -> -04:00) because tzdata is installed by pandas. Windows 11, Python 3.12.10, numpy 2.5.4, pandas 3.1.1, pyarrow 26.0.1.