def utc_to_local(dt):
    secs = calendar.timegm(dt.timetuple())
    return datetime(*time.localtime(secs)[:6])
Converts utc datetime to local
dataset/ETHPy150Open shelfworthy/python-spreedly/api.py/utc_to_local