A small, complete example of the issue
When you try to add a list of timedelta to a column that is datetime the behavior changes if the tzinfo is coming from datetime.tz.tzlocal(). In the example below I make two columns of timestamps, on with tz.tzlocal() and the other tz.tzutc() and then try to add a list of timedelta to it. The tzutc() ones behave as expected but the ones with tzloca() only the first row does the addition properly and for the rest the addition is done to unix epoch of 0!
# Your code here
import datetime
from dateutil import tz
import pandas as pd
dates1 = [datetime.datetime(2013, 9, 20,13,00, tzinfo=tz.tzlocal()) + datetime.timedelta(minutes=100*i) for i in range(10)]
dates2 = [datetime.datetime(2013, 9, 20,13,00, tzinfo=tz.tzutc()) + datetime.timedelta(minutes=100*i) for i in range(10)]
df = pd.DataFrame({"start1": dates1, "start2": dates2})
delta = [datetime.timedelta(seconds=x) for x in range(10)]
df['end1'] = df['start1'] + delta
df['end2'] = df['start2'] + delta
df
Expected Output
start1 start2 \
0 2013-09-20 13:00:00-07:00 2013-09-20 13:00:00+00:00
1 2013-09-20 14:40:00-07:00 2013-09-20 14:40:00+00:00
2 2013-09-20 16:20:00-07:00 2013-09-20 16:20:00+00:00
3 2013-09-20 18:00:00-07:00 2013-09-20 18:00:00+00:00
4 2013-09-20 19:40:00-07:00 2013-09-20 19:40:00+00:00
5 2013-09-20 21:20:00-07:00 2013-09-20 21:20:00+00:00
6 2013-09-20 23:00:00-07:00 2013-09-20 23:00:00+00:00
7 2013-09-21 00:40:00-07:00 2013-09-21 00:40:00+00:00
8 2013-09-21 02:20:00-07:00 2013-09-21 02:20:00+00:00
9 2013-09-21 04:00:00-07:00 2013-09-21 04:00:00+00:00
end1 end2
0 2013-09-20 13:00:00-07:00 2013-09-20 13:00:00+00:00
1 2013-09-20 13:00:01-07:00 2013-09-20 14:40:01+00:00
2 2013-09-20 13:00:02-07:00 2013-09-20 16:20:02+00:00
3 2013-09-20 13:00:03-07:00 2013-09-20 18:00:03+00:00
4 2013-09-20 13:00:04-07:00 2013-09-20 19:40:04+00:00
5 2013-09-20 13:00:05-07:00 2013-09-20 21:20:05+00:00
6 2013-09-20 13:00:06-07:00 2013-09-20 23:00:06+00:00
7 2013-09-20 13:00:07-07:00 2013-09-21 00:40:07+00:00
8 2013-09-20 13:00:08-07:00 2013-09-21 02:20:08+00:00
9 2013-09-20 13:00:09-07:00 2013-09-21 04:00:09+00:00
Output of pd.show_versions()
Comment From: jreback
fixed by #13583, in 0.19.0
In [1]: pd.__version__
Out[1]: '0.19.0'
In [2]: import datetime
...: from dateutil import tz
...: import pandas as pd
...: dates1 = [datetime.datetime(2013, 9, 20,13,00, tzinfo=tz.tzlocal()) + datetime.timedelta(minutes=100*i) for i in range(10)]
...: dates2 = [datetime.datetime(2013, 9, 20,13,00, tzinfo=tz.tzutc()) + datetime.timedelta(minutes=100*i) for i in range(10)]
...: df = pd.DataFrame({"start1": dates1, "start2": dates2})
...: delta = [datetime.timedelta(seconds=x) for x in range(10)]
...: df['end1'] = df['start1'] + delta
...: df['end2'] = df['start2'] + delta
...: df
...:
Out[2]:
start1 start2 end1 end2
0 2013-09-20 13:00:00-04:00 2013-09-20 13:00:00+00:00 2013-09-20 13:00:00-04:00 2013-09-20 13:00:00+00:00
1 2013-09-20 14:40:00-04:00 2013-09-20 14:40:00+00:00 2013-09-20 14:40:01-04:00 2013-09-20 14:40:01+00:00
2 2013-09-20 16:20:00-04:00 2013-09-20 16:20:00+00:00 2013-09-20 16:20:02-04:00 2013-09-20 16:20:02+00:00
3 2013-09-20 18:00:00-04:00 2013-09-20 18:00:00+00:00 2013-09-20 18:00:03-04:00 2013-09-20 18:00:03+00:00
4 2013-09-20 19:40:00-04:00 2013-09-20 19:40:00+00:00 2013-09-20 19:40:04-04:00 2013-09-20 19:40:04+00:00
5 2013-09-20 21:20:00-04:00 2013-09-20 21:20:00+00:00 2013-09-20 21:20:05-04:00 2013-09-20 21:20:05+00:00
6 2013-09-20 23:00:00-04:00 2013-09-20 23:00:00+00:00 2013-09-20 23:00:06-04:00 2013-09-20 23:00:06+00:00
7 2013-09-21 00:40:00-04:00 2013-09-21 00:40:00+00:00 2013-09-21 00:40:07-04:00 2013-09-21 00:40:07+00:00
8 2013-09-21 02:20:00-04:00 2013-09-21 02:20:00+00:00 2013-09-21 02:20:08-04:00 2013-09-21 02:20:08+00:00
9 2013-09-21 04:00:00-04:00 2013-09-21 04:00:00+00:00 2013-09-21 04:00:09-04:00 2013-09-21 04:00:09+00:00