mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-03 04:01:06 +08:00
6cebf05417
* BUG: Further corrections for days_at_time
- Revert to using DateOffset, as Timedelta doesn't handle offsetting by
one day over a tz change properly:
In [12]: pd.Timestamp('2004-04-05', tz='America/Chicago') + pd.Timedelta(days=-1)
Out[12]: Timestamp('2004-04-03 23:00:00-0600', tz='America/Chicago')
In [13]: pd.Timestamp('2004-04-05', tz='America/Chicago') + pd.DateOffset(days=-1)
Out[13]: Timestamp('2004-04-04 00:00:00-0600', tz='America/Chicago')
By creating a DateOffset using the `days` kwarg, the issue previously
fixed in bcc867b is addressed.
- To preempt any other pandas issues around day offsets, changes to
performing these with no timezone, then localizing to the local
timezone when shifting the time.
- Adds unit test for days_at_time
* STY: Remove unused import