Skip to content

Commit 6629446

Browse files
dbewjreback
authored andcommitted
TST7337: Try to resolve windows test failures.
1 parent 3e66a59 commit 6629446

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

pandas/tslib.pyx

+3-4
Original file line numberDiff line numberDiff line change
@@ -1029,7 +1029,7 @@ cdef inline object _get_zone(object tz):
10291029
return 'UTC'
10301030
else:
10311031
if _treat_tz_as_dateutil(tz):
1032-
return 'dateutil/' + tz._filename.split('zoneinfo/')[1]
1032+
return 'dateutil/' + tz._filename
10331033
else:
10341034
# tz is a pytz timezone or unknown.
10351035
try:
@@ -1047,9 +1047,8 @@ cpdef inline object maybe_get_tz(object tz):
10471047
Otherwise, just return tz.
10481048
'''
10491049
if isinstance(tz, string_types):
1050-
split_tz = tz.split('/', 1)
1051-
if split_tz[0] == 'dateutil':
1052-
tz = _dateutil_gettz(split_tz[1])
1050+
if tz.startswith('dateutil/'):
1051+
tz = _dateutil_gettz(tz[9:])
10531052
else:
10541053
tz = pytz.timezone(tz)
10551054
return tz

0 commit comments

Comments
 (0)