Hello,
I did some digging:
> Maybe it's a bug in python-tz?
Most likely:
Pandas uses this code to get the time offset for the local time
in tslib.pyx:
cpdef _get_utcoffset(tzinfo, obj):
try:
return tzinfo._utcoffset
except AttributeError:
return
At second thought it might not be a bug in python-tz, but some
undefined behavior that results from the pandas use of tz._utcoffset:
> tz = pytz.timezone('Asia/Tokyo')
> dt = datetime.datetime(2011,1,1)
>
> In[76]: tz.utcoffset(dt)
> Out[76]: datetime.timedelta(0, 32400)
>
> In
2 matches
Mail list logo