(value, to_tz)
return pytz.utc.localize(value).astimezone(to_tz)
Takes a timezone-naive datetime representing a UTC time

    returns a timezone-aware datetime localized to to_tz
Takes a timezone-naive datetime representing a UTC time
Takes a timezone - naive datetime representing a UTC time
def _adjust_utc_datetime_to_timezone(value, to_tz):
    """
    Takes a timezone-naive datetime representing a UTC time

    returns a timezone-aware datetime localized to to_tz
    """
    to_tz = _soft_assert_tz_not_string(to_tz)
    assert value.tzinfo is None
    return pytz.utc.localize(value).astimezone(to_tz)
def _adjust_utc_datetime_to_timezone ( value , to_tz ) : to_tz = _soft_assert_tz_not_string ( to_tz ) assert value . tzinfo is None return pytz . utc . localize ( value ) . astimezone ( to_tz )