File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 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
1818from numpy cimport int64_t
1919cnp.import_array()
2020
21- UTC_EQ_STR = ' Etc/GMT'
22- UTC_EQ = pytz.timezone(UTC_EQ_STR)
23-
2421# ----------------------------------------------------------------------
2522from pandas._libs.tslibs.util cimport is_integer_object, get_nat
2623
@@ -80,8 +77,13 @@ cpdef inline object get_timezone(object tz):
8077 if zone is None :
8178 return tz
8279
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' :
8587 return UTC
8688 return zone
8789 except AttributeError :
You can’t perform that action at this time.
0 commit comments