@@ -194,7 +194,8 @@ def _join_i8_wrapper(joinf, **kwargs):
194194 _datetimelike_ops = ['year' ,'month' ,'day' ,'hour' ,'minute' ,'second' ,
195195 'weekofyear' ,'week' ,'dayofweek' ,'weekday' ,'dayofyear' ,'quarter' , 'days_in_month' , 'daysinmonth' ,
196196 'date' ,'time' ,'microsecond' ,'nanosecond' ,'is_month_start' ,'is_month_end' ,
197- 'is_quarter_start' ,'is_quarter_end' ,'is_year_start' ,'is_year_end' ,'tz' ,'freq' ]
197+ 'is_quarter_start' ,'is_quarter_end' ,'is_year_start' ,'is_year_end' ,
198+ 'tz' ,'freq' ]
198199 _is_numeric_dtype = False
199200
200201
@@ -269,14 +270,7 @@ def __new__(cls, data=None,
269270 dayfirst = dayfirst ,
270271 yearfirst = yearfirst )
271272
272- if is_datetimetz (data ):
273- # extract the data whether a Series or Index
274- if isinstance (data , ABCSeries ):
275- data = data ._values
276- tz = data .tz
277- data = data .tz_localize (None , ambiguous = 'infer' ).values
278-
279- if issubclass (data .dtype .type , np .datetime64 ):
273+ if issubclass (data .dtype .type , np .datetime64 ) or is_datetimetz (data ):
280274 if isinstance (data , ABCSeries ):
281275 data = data ._values
282276 if isinstance (data , DatetimeIndex ):
0 commit comments