def _concat_datetimetz(to_concat, name=None):
 if (len(set([str(x.dtype) for x in to_concat])) != 1):
  raise ValueError('to_concat must have the same tz')
 tz = to_concat[0].tz
 new_values = np.concatenate([x.asi8 for x in to_concat])
 return to_concat[0]._simple_new(new_values, tz=tz, name=name)

def _concat_datetimetz ( to_concat , name = None ) : if ( len ( set ( [ str ( x . dtype ) for x in to_concat ] ) ) != 1 ) : raise ValueError ( 'to_concat must have the same tz' ) tz = to_concat [ 0 ] . tz new_values = np . concatenate ( [ x . asi8 for x in to_concat ] ) return to_concat [ 0 ] . _simple_new ( new_values , tz = tz , name = name )
concat datetimeindex with the same tz all inputs must be datetimeindex it is used in datetimeindex .