def normalize_time(timestamp):
    offset = timestamp.utcoffset()
    if offset is None:
        return timestamp
    return timestamp.replace(tzinfo=None) - offset
Convert a matplotlib image to a base64 png representation
dataset/ETHPy150Open openstack/python-monascaclient/monascaclient/openstack/common/timeutils.py/normalize_time--crossover with--dataset/ETHPy150Open plotly/plotly.py/plotly/matplotlylib/mplexporter/utils.py/image_to_base64