def localtime(value, timezone=None):
    if timezone is None:
        timezone = get_current_timezone()
    value = value.astimezone(timezone)
    if hasattr(timezone, 'normalize'):
        # available for pytz time zones
        value = timezone.normalize(value)
    return value
Converts an aware datetime.datetime to local time.
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/Django-1.6.10/django/utils/timezone.py/localtime