BUG/ENH: Handle AmbiguousTimeError in date rounding
State: closed

- [x] closes #18946
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

Discussed in #22560, adding an `ambiguous` argument to `round`, `ceil` and `floor` so the user can dictate how to handle rounding timestamps that land on ambiguous times.


Labels:
name: Bug
name: Enhancement
name: Timezones
description: Timezone data dtype

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

 - There are no PEP8 issues in the file [`pandas/core/indexes/datetimelike.py`](https://github.com/mroeschke/pandas/blob/ba7eddde9652c2ed58dae2413e9bc8c4f0a0aa86/pandas/core/indexes/datetimelike.py) !

 - There are no PEP8 issues in the file [`pandas/tests/scalar/timestamp/test_unary_ops.py`](https://github.com/mroeschke/pandas/blob/ba7eddde9652c2ed58dae2413e9bc8c4f0a0aa86/pandas/tests/scalar/timestamp/test_unary_ops.py) !

 - There are no PEP8 issues in the file [`pandas/tests/series/test_datetime_values.py`](https://github.com/mroeschke/pandas/blob/ba7eddde9652c2ed58dae2413e9bc8c4f0a0aa86/pandas/tests/series/test_datetime_values.py) !



##### Comment last updated on September 19, 2018 at 20:20 Hours UTC
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/22647?src=pr&el=h1) Report
> Merging [#22647](https://codecov.io/gh/pandas-dev/pandas/pull/22647?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/f87fe147c7494f3db56f3de31aeda12f80ef9c67?src=pr&el=desc) will **increase** coverage by `<.01%`.
> The diff coverage is `100%`.

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

```diff
@@            Coverage Diff             @@
##           master   #22647      +/-   ##
==========================================
+ Coverage   92.17%   92.17%   +<.01%     
==========================================
  Files         169      169              
  Lines       50769    50772       +3     
==========================================
+ Hits        46798    46801       +3     
  Misses       3971     3971
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.59% <100%> (ø)` | :arrow_up: |
| #single | `42.33% <55.55%> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/22647?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/indexes/datetimelike.py](https://codecov.io/gh/pandas-dev/pandas/pull/22647/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9kYXRldGltZWxpa2UucHk=) | `98.1% <100%> (+0.01%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/22647?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/22647?src=pr&el=footer). Last update [f87fe14...ba7eddd](https://codecov.io/gh/pandas-dev/pandas/pull/22647?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

Addressed your comments and all green @jreback 
thanks @mroeschke