def get_lat_long_tz()

in kundali/main.py [0:0]


def get_lat_long_tz(place: str) -> tuple[float, float, float]:
    # Define the API endpoint
    url = "https://maps.googleapis.com/maps/api/place/findplacefromtext/json"

    # Define the query parameters
    data = {
        "fields": "place_id,geometry",
        "input": place,
        "inputtype": "textquery",
        "key": params.MAPS_API_KEY,
    }

    # Make the GET request
    response = requests.get(url, params=data)

    candidate = response.json()["candidates"][0]

    return (
        candidate["geometry"]["location"]["lat"],
        candidate["geometry"]["location"]["lng"],
        get_utc_offset(candidate["place_id"]),
    )