File tree 1 file changed +7
-5
lines changed
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -18,9 +18,6 @@ cimport numpy as cnp
18
18
from numpy cimport int64_t
19
19
cnp.import_array()
20
20
21
- UTC_EQ_STR = ' Etc/GMT'
22
- UTC_EQ = pytz.timezone(UTC_EQ_STR)
23
-
24
21
# ----------------------------------------------------------------------
25
22
from pandas._libs.tslibs.util cimport is_integer_object, get_nat
26
23
@@ -80,8 +77,13 @@ cpdef inline object get_timezone(object tz):
80
77
if zone is None :
81
78
return tz
82
79
83
- # UTC and Etc/GMT are the same timezones
84
- if zone == UTC_EQ or zone == UTC_EQ_STR:
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' :
85
87
return UTC
86
88
return zone
87
89
except AttributeError :
You can’t perform that action at this time.
0 commit comments