def to_localtime(time):
    """Converts naive datetime to localtime based on settings"""

    utc_time = time.replace(tzinfo=datetime.timezone.utc)
    to_zone = timezone.get_default_timezone()
    return utc_time.astimezone(to_zone)
Converts naive datetime to localtime based on settings
django_rq/templatetags/django_rq.py