def localtime(value, tzval="UTC"):
    value = value.replace(tzinfo=pytz.utc)  # assuming value is utc time
    value = value.astimezone(pytz.timezone(tzval))  # convert to local time (tz-aware)
    value = value.replace(tzinfo=None)  # make tz-naive again
    return value
Convert tz-naive UTC datetime into tz-naive local datetime
dataset/ETHPy150Open ciex/souma/web_ui/helpers.py/localtime