@@ -194,7 +194,8 @@ def _join_i8_wrapper(joinf, **kwargs):
194
194
_datetimelike_ops = ['year' ,'month' ,'day' ,'hour' ,'minute' ,'second' ,
195
195
'weekofyear' ,'week' ,'dayofweek' ,'weekday' ,'dayofyear' ,'quarter' , 'days_in_month' , 'daysinmonth' ,
196
196
'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' ]
198
199
_is_numeric_dtype = False
199
200
200
201
@@ -269,14 +270,7 @@ def __new__(cls, data=None,
269
270
dayfirst = dayfirst ,
270
271
yearfirst = yearfirst )
271
272
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 ):
280
274
if isinstance (data , ABCSeries ):
281
275
data = data ._values
282
276
if isinstance (data , DatetimeIndex ):
0 commit comments