def normalize_time(timestamp):
    offset = timestamp.utcoffset()
    if offset is None:
        return timestamp
    return timestamp.replace(tzinfo=None) - offset
Normalize time in arbitrary timezone to UTC naive object.
dataset/ETHPy150Open openstack/python-monascaclient/monascaclient/openstack/common/timeutils.py/normalize_time