-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: date_range doesn't propagate ambigous=False to tz_localize #35302
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
Changes from 3 commits
c52364d
f94deb1
ef37d52
0fd04dc
2dbcda6
51f705e
ab0ee33
828fe2d
fb780d6
5438902
9bf49af
ec0aa37
dc28fd9
8053eb2
92cce2f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -941,7 +941,7 @@ Timezones | |
^^^^^^^^^ | ||
|
||
- Bug in :func:`to_datetime` with ``infer_datetime_format=True`` where timezone names (e.g. ``UTC``) would not be parsed correctly (:issue:`33133`) | ||
- | ||
- Bug in :func:`date_range` was raising AmbiguousTimeError for valid input with `ambiguous=False` (:issue:`35297`) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you move this to 1.2.0? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For sure! I don't think we have There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure that'd be great. |
||
|
||
|
||
Numeric | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -418,9 +418,9 @@ def _generate_range( | |
# index is localized datetime64 array -> have to convert | ||
# start/end as well to compare | ||
if start is not None: | ||
start = start.tz_localize(tz).asm8 | ||
start = start.tz_localize(tz, ambiguous).asm8 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you also pass There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. added both |
||
if end is not None: | ||
end = end.tz_localize(tz).asm8 | ||
end = end.tz_localize(tz, ambiguous).asm8 | ||
else: | ||
# Create a linearly spaced date_range in local time | ||
# Nanosecond-granularity timestamps aren't always correctly | ||
|
Uh oh!
There was an error while loading. Please reload this page.