def time_zones_for_geographical_number(numobj):
 e164_num = format_number(numobj, PhoneNumberFormat.E164)
 if (not e164_num.startswith(U_PLUS)):
  raise Exception('Expect E164 number to start with +')
 for prefix_len in range(TIMEZONE_LONGEST_PREFIX, 0, (-1)):
  prefix = e164_num[1:(1 + prefix_len)]
  if (prefix in TIMEZONE_DATA):
   return TIMEZONE_DATA[prefix]
 return _UNKNOWN_TIME_ZONE_LIST

def time_zones_for_geographical_number ( numobj ) : e164_num = format_number ( numobj , PhoneNumberFormat . E164 ) if ( not e164_num . startswith ( U_PLUS ) ) : raise Exception ( 'Expect E164 number to start with +' ) for prefix_len in range ( TIMEZONE_LONGEST_PREFIX , 0 , ( - 1 ) ) : prefix = e164_num [ 1 : ( 1 + prefix_len ) ] if ( prefix in TIMEZONE_DATA ) : return TIMEZONE_DATA [ prefix ] return _UNKNOWN_TIME_ZONE_LIST
returns a list of time zones to which a phone number belongs .