Handle utc and box parameters for to_datetime
State: closed

- [ ] closes #23760
- [ ] tests added / passed
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry


Labels:
name: Bug
name: Datetime
description: Datetime data dtype

Comments:
Hello @jzhaojieh! Thanks for updating the PR.

 - There are no PEP8 issues in the file [`pandas/core/arrays/datetimelike.py`](https://github.com/jzhaojieh/pandas/blob/4fcd2c4617081c137708c4e5230cda589c885339/pandas/core/arrays/datetimelike.py) !

 - There are no PEP8 issues in the file [`pandas/core/arrays/datetimes.py`](https://github.com/jzhaojieh/pandas/blob/4fcd2c4617081c137708c4e5230cda589c885339/pandas/core/arrays/datetimes.py) !

 - There are no PEP8 issues in the file [`pandas/core/dtypes/common.py`](https://github.com/jzhaojieh/pandas/blob/4fcd2c4617081c137708c4e5230cda589c885339/pandas/core/dtypes/common.py) !

 - There are no PEP8 issues in the file [`pandas/core/dtypes/dtypes.py`](https://github.com/jzhaojieh/pandas/blob/4fcd2c4617081c137708c4e5230cda589c885339/pandas/core/dtypes/dtypes.py) !

 - There are no PEP8 issues in the file [`pandas/core/dtypes/missing.py`](https://github.com/jzhaojieh/pandas/blob/4fcd2c4617081c137708c4e5230cda589c885339/pandas/core/dtypes/missing.py) !

 - There are no PEP8 issues in the file [`pandas/core/internals/blocks.py`](https://github.com/jzhaojieh/pandas/blob/4fcd2c4617081c137708c4e5230cda589c885339/pandas/core/internals/blocks.py) !

 - There are no PEP8 issues in the file [`pandas/core/tools/datetimes.py`](https://github.com/jzhaojieh/pandas/blob/4fcd2c4617081c137708c4e5230cda589c885339/pandas/core/tools/datetimes.py) !

 - In the file [`pandas/tests/arrays/test_datetimes.py`](https://github.com/jzhaojieh/pandas/blob/4fcd2c4617081c137708c4e5230cda589c885339/pandas/tests/arrays/test_datetimes.py), following                are the PEP8 issues :
> [Line 18:49](https://github.com/jzhaojieh/pandas/blob/4fcd2c4617081c137708c4e5230cda589c885339/pandas/tests/arrays/test_datetimes.py#L18): [W291](https://duckduckgo.com/?q=pep8%20W291) trailing whitespace
> [Line 19:13](https://github.com/jzhaojieh/pandas/blob/4fcd2c4617081c137708c4e5230cda589c885339/pandas/tests/arrays/test_datetimes.py#L19): [E128](https://duckduckgo.com/?q=pep8%20E128) continuation line under-indented for visual indent
> [Line 26:49](https://github.com/jzhaojieh/pandas/blob/4fcd2c4617081c137708c4e5230cda589c885339/pandas/tests/arrays/test_datetimes.py#L26): [W291](https://duckduckgo.com/?q=pep8%20W291) trailing whitespace
> [Line 27:13](https://github.com/jzhaojieh/pandas/blob/4fcd2c4617081c137708c4e5230cda589c885339/pandas/tests/arrays/test_datetimes.py#L27): [E128](https://duckduckgo.com/?q=pep8%20E128) continuation line under-indented for visual indent
> [Line 34:49](https://github.com/jzhaojieh/pandas/blob/4fcd2c4617081c137708c4e5230cda589c885339/pandas/tests/arrays/test_datetimes.py#L34): [W291](https://duckduckgo.com/?q=pep8%20W291) trailing whitespace
> [Line 35:13](https://github.com/jzhaojieh/pandas/blob/4fcd2c4617081c137708c4e5230cda589c885339/pandas/tests/arrays/test_datetimes.py#L35): [E128](https://duckduckgo.com/?q=pep8%20E128) continuation line under-indented for visual indent
> [Line 37:54](https://github.com/jzhaojieh/pandas/blob/4fcd2c4617081c137708c4e5230cda589c885339/pandas/tests/arrays/test_datetimes.py#L37): [W291](https://duckduckgo.com/?q=pep8%20W291) trailing whitespace
> [Line 38:13](https://github.com/jzhaojieh/pandas/blob/4fcd2c4617081c137708c4e5230cda589c885339/pandas/tests/arrays/test_datetimes.py#L38): [E128](https://duckduckgo.com/?q=pep8%20E128) continuation line under-indented for visual indent


 - There are no PEP8 issues in the file [`pandas/tests/dtypes/test_common.py`](https://github.com/jzhaojieh/pandas/blob/4fcd2c4617081c137708c4e5230cda589c885339/pandas/tests/dtypes/test_common.py) !

 - There are no PEP8 issues in the file [`pandas/tests/dtypes/test_dtypes.py`](https://github.com/jzhaojieh/pandas/blob/4fcd2c4617081c137708c4e5230cda589c885339/pandas/tests/dtypes/test_dtypes.py) !

 - There are no PEP8 issues in the file [`pandas/tests/dtypes/test_missing.py`](https://github.com/jzhaojieh/pandas/blob/4fcd2c4617081c137708c4e5230cda589c885339/pandas/tests/dtypes/test_missing.py) !

 - There are no PEP8 issues in the file [`pandas/tests/frame/test_dtypes.py`](https://github.com/jzhaojieh/pandas/blob/4fcd2c4617081c137708c4e5230cda589c885339/pandas/tests/frame/test_dtypes.py) !

 - There are no PEP8 issues in the file [`pandas/tests/io/json/test_json_table_schema.py`](https://github.com/jzhaojieh/pandas/blob/4fcd2c4617081c137708c4e5230cda589c885339/pandas/tests/io/json/test_json_table_schema.py) !



##### Comment last updated on December 04, 2018 at 16:25 Hours UTC
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24082?src=pr&el=h1) Report
> Merging [#24082](https://codecov.io/gh/pandas-dev/pandas/pull/24082?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/08395af43b813b69b1cf038d260104cfeeb3e787?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `11.11%`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/24082/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/24082?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #24082      +/-   ##
==========================================
- Coverage   42.38%   42.38%   -0.01%     
==========================================
  Files         161      161              
  Lines       51701    51707       +6     
==========================================
  Hits        21914    21914              
- Misses      29787    29793       +6
```

| Flag | Coverage Δ | |
|---|---|---|
| #single | `42.38% <11.11%> (-0.01%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/24082?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/tools/datetimes.py](https://codecov.io/gh/pandas-dev/pandas/pull/24082/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvdG9vbHMvZGF0ZXRpbWVzLnB5) | `32.42% <0%> (-0.4%)` | :arrow_down: |
| [pandas/core/dtypes/concat.py](https://codecov.io/gh/pandas-dev/pandas/pull/24082/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZHR5cGVzL2NvbmNhdC5weQ==) | `55.71% <25%> (-0.54%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24082?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24082?src=pr&el=footer). Last update [08395af...004fb26](https://codecov.io/gh/pandas-dev/pandas/pull/24082?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24082?src=pr&el=h1) Report
> Merging [#24082](https://codecov.io/gh/pandas-dev/pandas/pull/24082?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/08395af43b813b69b1cf038d260104cfeeb3e787?src=pr&el=desc) will **increase** coverage by `49.87%`.
> The diff coverage is `98.14%`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/24082/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/24082?src=pr&el=tree)

```diff
@@             Coverage Diff             @@
##           master   #24082       +/-   ##
===========================================
+ Coverage   42.38%   92.25%   +49.87%     
===========================================
  Files         161      161               
  Lines       51701    51693        -8     
===========================================
+ Hits        21914    47691    +25777     
+ Misses      29787     4002    -25785
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.66% <98.14%> (?)` | |
| #single | `42.5% <57.4%> (+0.12%)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/24082?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/dtypes/common.py](https://codecov.io/gh/pandas-dev/pandas/pull/24082/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZHR5cGVzL2NvbW1vbi5weQ==) | `95.62% <ø> (+25.23%)` | :arrow_up: |
| [pandas/core/arrays/datetimelike.py](https://codecov.io/gh/pandas-dev/pandas/pull/24082/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYXJyYXlzL2RhdGV0aW1lbGlrZS5weQ==) | `96.34% <100%> (+45.91%)` | :arrow_up: |
| [pandas/core/arrays/datetimes.py](https://codecov.io/gh/pandas-dev/pandas/pull/24082/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYXJyYXlzL2RhdGV0aW1lcy5weQ==) | `98.43% <100%> (+34.63%)` | :arrow_up: |
| [pandas/core/internals/blocks.py](https://codecov.io/gh/pandas-dev/pandas/pull/24082/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW50ZXJuYWxzL2Jsb2Nrcy5weQ==) | `93.69% <100%> (+41.32%)` | :arrow_up: |
| [pandas/core/dtypes/missing.py](https://codecov.io/gh/pandas-dev/pandas/pull/24082/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZHR5cGVzL21pc3NpbmcucHk=) | `93.1% <100%> (+35.63%)` | :arrow_up: |
| [pandas/core/tools/datetimes.py](https://codecov.io/gh/pandas-dev/pandas/pull/24082/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvdG9vbHMvZGF0ZXRpbWVzLnB5) | `85.45% <100%> (+52.63%)` | :arrow_up: |
| [pandas/core/dtypes/dtypes.py](https://codecov.io/gh/pandas-dev/pandas/pull/24082/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZHR5cGVzL2R0eXBlcy5weQ==) | `95.33% <97.14%> (+19.17%)` | :arrow_up: |
| [pandas/core/computation/pytables.py](https://codecov.io/gh/pandas-dev/pandas/pull/24082/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvY29tcHV0YXRpb24vcHl0YWJsZXMucHk=) | `92.37% <0%> (+0.3%)` | :arrow_up: |
| [pandas/io/pytables.py](https://codecov.io/gh/pandas-dev/pandas/pull/24082/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL3B5dGFibGVzLnB5) | `92.3% <0%> (+0.92%)` | :arrow_up: |
| [pandas/util/\_test\_decorators.py](https://codecov.io/gh/pandas-dev/pandas/pull/24082/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvX3Rlc3RfZGVjb3JhdG9ycy5weQ==) | `93.24% <0%> (+4.05%)` | :arrow_up: |
| ... and [126 more](https://codecov.io/gh/pandas-dev/pandas/pull/24082/diff?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24082?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24082?src=pr&el=footer). Last update [08395af...4fcd2c4](https://codecov.io/gh/pandas-dev/pandas/pull/24082?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

Thanks for the pull request. Looks like you pulled in some changes from other PRs. Could you limit this branch to the specific fix?
pls merge master
Closed by #24407