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 with unit, utc=True and errors='ignore' does not coerce to UTC #23758

Closed
mroeschke opened this issue Nov 18, 2018 · 2 comments

Comments

3 participants
@mroeschke
Copy link
Member

commented Nov 18, 2018

In [3]: pd.__version__
Out[3]: '0.24.0.dev0+1040.g24bce1a5f'

In [4]: pd.to_datetime([1], unit='s', box=True, utc=True, errors='ignore')
Out[4]: DatetimeIndex(['1970-01-01 00:00:01'], dtype='datetime64[ns]', freq=None)

It appears the tz argument is missing from the output here:

return Index(result, name=name)

Expected Output

In [4]: pd.to_datetime([1], unit='s', box=True, utc=True, errors='ignore')
Out[4]: DatetimeIndex(['1970-01-01 00:00:01+00:00'], dtype='datetime64[ns, UTC]', freq=None)
@genchik1

This comment has been minimized.

Copy link

commented Nov 27, 2018

@mroeschke let me fix it

@mroeschke

This comment has been minimized.

Copy link
Member Author

commented Nov 27, 2018

Looks like @srinivasreddy is already working on a PR for this issue. Feel free to coordinate with him on this issue.

@jreback jreback added this to the 0.24.0 milestone Dec 24, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.