BUG: to_datetime ignores utc=True when arg is Series · Issue #6415 · pandas-dev/pandas (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Description
Is this a bug or a feature that I don't understand:
data = ['20100102 121314', '20100102 121315'] print (pd.to_datetime(data, format='%Y%m%d %H%M%S', utc=True)[0]).repr() print (pd.to_datetime(pd.Series(data), format='%Y%m%d %H%M%S', utc=True)[0]).repr() print (pd.to_datetime(pd.TimeSeries(data), format='%Y%m%d %H%M%S', utc=True)[0]).repr()
results in
Timestamp('2010-01-02 12:13:14+0000', tz='UTC') Timestamp('2010-01-02 12:13:14', tz=None) Timestamp('2010-01-02 12:13:14', tz=None)
Using version '0.13.1'
Other example in #15760