-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: fix to_datetime(dti, utc=True) #27733
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 2 commits
90eb285
624437e
2226635
84c85d3
b0d8fbc
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 |
---|---|---|
|
@@ -334,6 +334,9 @@ def _convert_listlike_datetimes( | |
return DatetimeIndex(arg, tz=tz, name=name) | ||
except ValueError: | ||
pass | ||
elif tz: | ||
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. I think this would fail if a user passes I was thinking more:
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.
or are you suggesting that this is wrong because 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. Oh! It does work. |
||
# DatetimeArray, DatetimeIndex | ||
return arg.tz_localize(tz) | ||
|
||
return arg | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you put
utc=True
in double-back quotes