U
    Ò­Òc  ã                   @   s*   d Z ddlmZ ddlmZ ddd„ZdS )z4Performs requests to the Google Maps Directions API.é    )Úconvert)ÚdatetimeNc                 C   s6   t  |¡t  |pt ¡ ¡dœ}|r*||d< |  d|¡S )aå  Get time zone for a location on the earth, as well as that location's
    time offset from UTC.

    :param location: The latitude/longitude value representing the location to
        look up.
    :type location: string, dict, list, or tuple

    :param timestamp: Timestamp specifies the desired time as seconds since
        midnight, January 1, 1970 UTC. The Time Zone API uses the timestamp to
        determine whether or not Daylight Savings should be applied. Times
        before 1970 can be expressed as negative values. Optional. Defaults to
        ``datetime.utcnow()``.
    :type timestamp: int or datetime.datetime

    :param language: The language in which to return results.
    :type language: string

    :rtype: dict
    )ÚlocationÚ	timestampÚlanguagez/maps/api/timezone/json)r   ZlatlngÚtimer   ÚutcnowZ_request)Zclientr   r   r   Úparams© r
   úP/home/ubuntu/graampay/app_env/lib/python3.8/site-packages/googlemaps/timezone.pyÚtimezone   s    þr   )NN)Ú__doc__Ú
googlemapsr   r   r   r
   r
   r
   r   Ú<module>   s   