def get_next_timezone_transition(zone=None, dt=None):
 zone = get_timezone(zone)
 dt = _get_datetime(dt).replace(tzinfo=None)
 if (not hasattr(zone, '_utc_transition_times')):
  raise TypeError('Given timezone does not have UTC transition times.  This can happen because the operating system fallback local timezone is used or a custom timezone object')
 try:
  idx = max(0, bisect_right(zone._utc_transition_times, dt))
  old_trans = zone._transition_info[(idx - 1)]
  new_trans = zone._transition_info[idx]
  old_tz = zone._tzinfos[old_trans]
  new_tz = zone._tzinfos[new_trans]
 except (LookupError, ValueError):
  return None
 return TimezoneTransition(activates=zone._utc_transition_times[idx], from_tzinfo=old_tz, to_tzinfo=new_tz, reference_date=dt)

def get_next_timezone_transition ( zone = None , dt = None ) : zone = get_timezone ( zone ) dt = _get_datetime ( dt ) . replace ( tzinfo = None ) if ( not hasattr ( zone , '_utc_transition_times' ) ) : raise TypeError ( 'Given timezone does not have UTC transition times.  This can happen because the operating system fallback local timezone is used or a custom timezone object' ) try : idx = max ( 0 , bisect_right ( zone . _utc_transition_times , dt ) ) old_trans = zone . _transition_info [ ( idx - 1 ) ] new_trans = zone . _transition_info [ idx ] old_tz = zone . _tzinfos [ old_trans ] new_tz = zone . _tzinfos [ new_trans ] except ( LookupError , ValueError ) : return None return TimezoneTransition ( activates = zone . _utc_transition_times [ idx ] , from_tzinfo = old_tz , to_tzinfo = new_tz , reference_date = dt )
given a timezone it will return a :class:timezonetransition object that holds the information about the next timezone transition thats going to happen .