Skip to content
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

BUG: to_datetime(Timestamp) utc argument #24415

Closed
mroeschke opened this issue Dec 24, 2018 · 2 comments · Fixed by #24441
Closed

BUG: to_datetime(Timestamp) utc argument #24415

mroeschke opened this issue Dec 24, 2018 · 2 comments · Fixed by #24441
Labels
Bug Datetime Datetime data dtype
Milestone

Comments

@mroeschke
Copy link
Member

mroeschke commented Dec 24, 2018

In [7]: pd.to_datetime(pd.Timestamp(2018,1,1), utc=True)
Out[7]: Timestamp('2018-01-01 00:00:00')

# This should raise
In [7]: pd.to_datetime(pd.Timestamp(2018,1,1, tz='US/Pacific'), utc=True)
Out[7]: Timestamp('2018-01-01 00:00:00')
@mroeschke mroeschke added Bug Datetime Datetime data dtype labels Dec 24, 2018
@mroeschke mroeschke changed the title BUG: to_datetime(Timestamp, box=False) doesn't return numpy.datetime64 BUG: to_datetime(Timestamp) ignores box and utc arguments Dec 24, 2018
@jreback
Copy link
Contributor

jreback commented Dec 24, 2018

to be honest I would actually deprecate box; its not very useful externally.

@mroeschke
Copy link
Member Author

Sure thing. I'd agree that to_datetime should prioritize keeping values in pandas data structures. Let's create a new issue regarding the deprecation of box in to_datetime and to_timedelta

@mroeschke mroeschke changed the title BUG: to_datetime(Timestamp) ignores box and utc arguments BUG: to_datetime(Timestamp) utc argument Dec 24, 2018
@mroeschke mroeschke added this to the 0.24.0 milestone Dec 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Datetime Datetime data dtype
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants