title: Difficulty getting local time
body: <p>I am struggling to understand how to get time series in local time (with DST) from excel file into a pandas timeseries in UTC. I’ve tried various combinations of .localize(), .replace(), .astimezone(), .to_datetime() , all without luck and I feel like I am getting an inconsistent results in situations that should (at least in my mind) be returning the same thing. The example that gets to the heart of the dilemma follows:. I would be grateful if someone could explain why these two sections of code produce different answers. The first of these sections accomplishes what I would like. It seems like the second should do the same, but it doesn’t.</p>
  
  <pre><code>In[1]: UTCtz=timezone("UTC")
  In[2]: localtz=timezone("US/Central")
  In[3]: dt1=datetime.datetime(2016,3,13,1,0,0,0)
  In[4]: dt2=datetime.datetime(2016,3,13,3,0,0,0)
  In[5]: dt3=localtz.localize(dt1)
  In[6]: dt3
  Out[6]: datetime.datetime(2016, 3, 13, 1, 0, tzinfo=&lt;DstTzInfo 'US/Central' CST-1 day, 18:00:00 STD&gt;)
  In[7]: dt4=localtz.localize(dt2)
  In[8]: dt4
  Out[8]: datetime.datetime(2016, 3, 13, 3, 0, tzinfo=&lt;DstTzInfo 'US/Central' CDT-1 day, 19:00:00 DST&gt;)
  In[9]: dt3.astimezone(UTCtz)
  Out[9]: datetime.datetime(2016, 3, 13, 7, 0, tzinfo=&lt;UTC&gt;)
  In[10]: dt4.astimezone(UTCtz)
  Out[10]: datetime.datetime(2016, 3, 13, 8, 0, tzinfo=&lt;UTC&gt;)
  </code></pre>
  
  <p>dt1 and dt2 straddle the DST switch and the conversion to UTC is what I was expecting.
  Alternatively, here is what I get from the series that I’ve read from excel into a dataframe (column “timeindex”).</p>
  
  <pre><code>In[1]: df.iloc[2]["timeindex"]
  Out[1]: Timestamp('2016-03-13 01:00:00')
  In[2]: df.iloc[3]["timeindex"]
  Out[2]: Timestamp('2016-03-13 03:00:00')
  In[3]: localtz.localize(df.iloc[2]["timeindex"])
  Out[3]: Timestamp('2016-03-13 01:00:00-0600', tz='US/Central')
  In[4]: localtz.localize(df.iloc[3]["timeindex"])
  Out[4]: Timestamp('2016-03-13 04:00:00-0500', tz='US/Central')
  </code></pre>
  
  <p>The same function calls as before but the utc gap between times increases by an hour !
  What is going on here ?</p>