-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Allow tz-aware inputs in Holiday.dates #9824
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
your tests don't check for a holiday with a timezone. wasn't this the use case? |
@jreback the specific issue solved here is that calling |
@ssanderson ok, I see, then ok! pls squash and good to go |
8ae03df
to
9c33eff
Compare
Previously, the timezone of only the start_date was lost, causing the subsequent call to `DatetimeIndex` to fail if a both start_date and end_date were tz-aware.
9c33eff
to
0a216f4
Compare
@jreback squashed into one commit and rebased with master. I assume that's what you meant? |
Allow tz-aware inputs in Holiday.dates
@ssanderson yep thanks for the PR! |
fixed thanks! |
closes #9825
Previously, passing tz-aware inputs to Holiday.dates would always result in an error because the the input start_date was converted in a way that destroyed timezone information. This PR makes that conversion correctly preserve tz info, and converts several of the existing tests to run with both tz-aware and tz-naive inputs.
Noticed while working on a new trading calendar implementation here: quantopian/zipline#556.