BUG: Raise if not able to get offset from tz
State: closed

 - [x] closes #10459
 - [x] tests added / passed
 - [x] passes ``git diff upstream/master --name-only -- '*.py' | flake8 --diff``
 - [ ] whatsnew entry


Labels:
name: Error Reporting
description: Incorrect or improved errors from pandas
name: Timezones
description: Timezone data dtype

Comments:
can u add a test? (e.g. pass in something like 'foo')

also can add a windows timezone test (like your issue) but need to skip if it in windows 

and a whatsnew note - 

bug fix section
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16129?src=pr&el=h1) Report
> Merging [#16129](https://codecov.io/gh/pandas-dev/pandas/pull/16129?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/8d122e633a6b08e3f9dfad80050da42d789210d4?src=pr&el=desc) will **decrease** coverage by `0.02%`.
> The diff coverage is `n/a`.

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

```diff
@@            Coverage Diff             @@
##           master   #16129      +/-   ##
==========================================
- Coverage   90.86%   90.83%   -0.03%     
==========================================
  Files         159      159              
  Lines       50771    50771              
==========================================
- Hits        46133    46119      -14     
- Misses       4638     4652      +14
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.61% <ø> (-0.03%)` | :arrow_down: |
| #single | `40.33% <ø> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/16129?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/plotting/\_converter.py](https://codecov.io/gh/pandas-dev/pandas/pull/16129?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL19jb252ZXJ0ZXIucHk=) | `63.54% <0%> (-1.82%)` | :arrow_down: |
| [pandas/core/common.py](https://codecov.io/gh/pandas-dev/pandas/pull/16129?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvY29tbW9uLnB5) | `90.68% <0%> (-0.35%)` | :arrow_down: |
| [pandas/core/indexes/datetimes.py](https://codecov.io/gh/pandas-dev/pandas/pull/16129?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9kYXRldGltZXMucHk=) | `95.33% <0%> (-0.1%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16129?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/16129?src=pr&el=footer). Last update [8d122e6...48c0a5a](https://codecov.io/gh/pandas-dev/pandas/pull/16129?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/16129?src=pr&el=h1) Report
> Merging [#16129](https://codecov.io/gh/pandas-dev/pandas/pull/16129?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/8d122e633a6b08e3f9dfad80050da42d789210d4?src=pr&el=desc) will **decrease** coverage by `0.02%`.
> The diff coverage is `n/a`.

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

```diff
@@            Coverage Diff             @@
##           master   #16129      +/-   ##
==========================================
- Coverage   90.86%   90.83%   -0.03%     
==========================================
  Files         159      159              
  Lines       50771    50771              
==========================================
- Hits        46133    46119      -14     
- Misses       4638     4652      +14
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.61% <ø> (-0.03%)` | :arrow_down: |
| #single | `40.33% <ø> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/16129?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/plotting/\_converter.py](https://codecov.io/gh/pandas-dev/pandas/pull/16129?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL19jb252ZXJ0ZXIucHk=) | `63.54% <0%> (-1.82%)` | :arrow_down: |
| [pandas/core/common.py](https://codecov.io/gh/pandas-dev/pandas/pull/16129?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvY29tbW9uLnB5) | `90.68% <0%> (-0.35%)` | :arrow_down: |
| [pandas/core/indexes/datetimes.py](https://codecov.io/gh/pandas-dev/pandas/pull/16129?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9kYXRldGltZXMucHk=) | `95.33% <0%> (-0.1%)` | :arrow_down: |

------

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

Closing for now - will open a new one that handles the windows timezone objects correctly without logging warnings.
ok, just reopen this one. no need to create another