Skip to content

Commit 1cc469e

Browse files
committed
removing extra stuff
1 parent ca200cd commit 1cc469e

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
@@ -6,9 +6,6 @@
66

77
from dateutil.parser import parse
88
from dateutil.tz.tz import tzoffset
9-
from hypothesis import given
10-
from hypothesis.extra.pytz import timezones
11-
from hypothesis.strategies import datetimes
129
import numpy as np
1310
import pytest
1411
import pytz
@@ -518,27 +515,6 @@ def test_to_datetime_different_offsets(self, cache):
518515
result = pd.to_datetime(arr, cache=cache)
519516
tm.assert_index_equal(result, expected)
520517

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

0 commit comments

Comments
 (0)