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
Used to create a new registry context
dataset/ETHPy150Open ciex/souma/web_ui/helpers.py/localtime--crossover with--dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/Paste-2.0.1/paste/registry.py/Registry.prepare