def conv_unixtime(t):
    try:
        t = datetime.strptime(t, '%Y-%m-%d %H:%M:%S')
        t = int(time.mktime(t.timetuple()))
    except TypeError:
        t = None
    except __HOLE__:
        print('error: invalid time \'%s\'' % t)
        exit(1)

    return t
dataset/ETHPy150Open YoshiyukiYamauchi/mrtparse/examples/slice.py/conv_unixtime