Skip to content

Commit d1078e6

Browse files
committed
removing extra stuff
1 parent 18761b5 commit d1078e6

File tree

2 files changed

+0
-33
lines changed

2 files changed

+0
-33
lines changed

pandas/_libs/tslibs/timezones.pyx

-9
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,6 @@ cpdef inline object get_timezone(object tz):
7676
zone = tz.zone
7777
if zone is None:
7878
return tz
79-
80-
# UTC and Etc/GMT or Etc/GMT+0 are the same timezones
81-
if not isinstance(zone, str):
82-
str_zone = str(zone)
83-
else:
84-
str_zone = zone
85-
86-
if str_zone == 'Etc/GMT' or str_zone == 'Etc/GMT+0':
87-
return UTC
8879
return zone
8980
except AttributeError:
9081
return tz

pandas/tests/indexes/datetimes/test_tools.py

-24
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
import dateutil
99
from dateutil.parser import parse
1010
from dateutil.tz.tz import tzoffset
11-
from hypothesis import given
12-
from hypothesis.extra.pytz import timezones
13-
from hypothesis.strategies import datetimes
1411
import numpy as np
1512
import pytest
1613
import pytz
@@ -520,27 +517,6 @@ def test_to_datetime_different_offsets(self, cache):
520517
result = pd.to_datetime(arr, cache=cache)
521518
tm.assert_index_equal(result, expected)
522519

523-
@pytest.mark.parametrize('errors', ('ignore', 'coerce', 'raise'))
524-
@pytest.mark.parametrize('suffix', ([], ['foo']))
525-
@pytest.mark.parametrize('convertor', (lambda x: x, str))
526-
@given(date1=datetimes(timezones=timezones()),
527-
date2=datetimes(timezones=timezones()))
528-
def test_to_datetime_cache_invariance(self, date1, date2, suffix,
529-
errors, convertor):
530-
# prepare a list of dates to parse with some duplicates
531-
# and possible invalid string
532-
arg = [convertor(date1), convertor(date2)] * 5 + suffix
533-
534-
def _get_answer(cache):
535-
try:
536-
return pd.to_datetime(arg, cache=cache, errors=errors)
537-
except ValueError as err:
538-
return err.args
539-
540-
cache_on = _get_answer(cache=True)
541-
cache_off = _get_answer(cache=False)
542-
tm.assert_almost_equal(cache_on, cache_off)
543-
544520
@pytest.mark.parametrize('cache', [True, False])
545521
def test_to_datetime_tz_pytz(self, cache):
546522
# see gh-8260

0 commit comments

Comments
 (0)