We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3e66a59 commit 6629446Copy full SHA for 6629446
pandas/tslib.pyx
@@ -1029,7 +1029,7 @@ cdef inline object _get_zone(object tz):
1029
return 'UTC'
1030
else:
1031
if _treat_tz_as_dateutil(tz):
1032
- return 'dateutil/' + tz._filename.split('zoneinfo/')[1]
+ return 'dateutil/' + tz._filename
1033
1034
# tz is a pytz timezone or unknown.
1035
try:
@@ -1047,9 +1047,8 @@ cpdef inline object maybe_get_tz(object tz):
1047
Otherwise, just return tz.
1048
'''
1049
if isinstance(tz, string_types):
1050
- split_tz = tz.split('/', 1)
1051
- if split_tz[0] == 'dateutil':
1052
- tz = _dateutil_gettz(split_tz[1])
+ if tz.startswith('dateutil/'):
+ tz = _dateutil_gettz(tz[9:])
1053
1054
tz = pytz.timezone(tz)
1055
return tz
0 commit comments