def setTZ(name):
    """
    Set time zone.

    @param name: a time zone name
    @type name: L{str}
    """
    if tzset is None:
        return

    if name is None:
        try:
            del environ["TZ"]
        except KeyError:
            pass
    else:
        environ["TZ"] = name
    tzset()

    Set time zone.

    @param name: a time zone name
    @type name: L{str}
    
stackoverflow/venv/lib/python3.6/site-packages/twisted/python/test/test_tzhelper.py