def gen_time_str(t_info):
    """
    从时间信息生成要访问的日志文件名

    20150101

    """
    year = str(t_info.tm_year)
    if t_info.tm_mon < 10:
        month = '0' + str(t_info.tm_mon)
    else:
        month = str(t_info.tm_mon)
    if t_info.tm_mday < 10:
        day = '0' + str(t_info.tm_mday)
    else:
        day = str(t_info.tm_mday)
    return year + month + day
