def get_timezone():
search_result_length = 5
search = request.args.get('s', '')
search = search.lower()
count = 0
timezones_list = []
for tz in common_timezones:
if search in tz.lower():
timezones_list.append(append_offset_to_timezone(tz))
count += 1
if count >= search_result_length:
break
return jsonify({'status': 'OK', 'data': timezones_list})
评论列表
文章目录