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 · Fixed by #24407
Closed

BUG: to_datetime with unit, utc=True and errors='ignore' does not coerce to UTC #23758

mroeschke opened this issue Nov 18, 2018 · 2 comments · Fixed by #24407

Comments

@mroeschke
Copy link
Member

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
Copy link

@mroeschke let me fix it

@mroeschke
Copy link
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
3 participants