def format_date(utc, isoformat=False):
    u = datetime.strptime(utc.replace('+0000','UTC'), '%a %b %d %H:%M:%S %Z %Y')
    # This is the least painful way I could find to create a non-naive
    # datetime including a UTC timezone. Alternative suggestions
    # welcome.
    unew = datetime.combine(u.date(), time(u.time().hour,
        u.time().minute, u.time().second, tzinfo=UTC))

    # Convert to localtime
    unew = unew.astimezone(Local)

    if isoformat:
        return unew.isoformat()
    else:
        return unew.strftime('%Y-%m-%d %H:%M:%S %Z')
do sth when testing start
dataset/ETHPy150Open sixohsix/twitter/twitter/archiver.py/format_date--crossover with--dataset/ETHPy150Open idumpling/robotx/robotx/core/distlistener.py/MultiListener.start_test