azure.maps.timezone.operations package¶
- class azure.maps.timezone.operations.TimezoneOperations(*args, **kwargs)[source]¶
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
TimezoneClient’stimezoneattribute.- convert_windows_timezone_to_iana(format: str = 'json', *, windows_timezone_id: str, windows_territory_code: str | None = None, **kwargs: Any) List[MutableMapping[str, Any]][source]¶
Use to get the IANA ID.
The
Get Windows to IANA Time ZoneAPI is an HTTPGETrequest that returns a corresponding Internet Assigned Numbers Authority (IANA) ID, given a valid Windows Time Zone ID. Multiple IANA IDs may be returned for a single Windows ID. It is possible to narrow these results by adding an optional territory parameter.- Parameters:
format (str) – Desired format of the response. Only
jsonformat is supported. “json” Default value is “json”.- Keyword Arguments:
- Returns:
list of JSON object
- Return type:
list[JSON]
- Raises:
Example
# response body for status code(s): 200 response == [ { "AliasOf": "str", "HasZone1970Location": bool, "Id": "str", "IsAlias": bool } ]
- get_iana_timezone_ids(format: str = 'json', **kwargs: Any) List[MutableMapping[str, Any]][source]¶
Use to get the list of IANA time zone IDs.
The
Get IANA Time ZonesAPI is an HTTPGETrequest that returns a full list of Internet Assigned Numbers Authority (IANA) time zone IDs. Updates to the IANA service are reflected in the system within one day.- Parameters:
format (str) – Desired format of the response. Only
jsonformat is supported. “json” Default value is “json”.- Returns:
list of JSON object
- Return type:
list[JSON]
- Raises:
Example
# response body for status code(s): 200 response == [ { "AliasOf": "str", "HasZone1970Location": bool, "Id": "str", "IsAlias": bool } ]
- get_iana_version(format: str = 'json', **kwargs: Any) MutableMapping[str, Any][source]¶
Use to get the current IANA version number.
The
Get Time Zone IANA VersionAPI is an HTTPGETrequest that returns the current Internet Assigned Numbers Authority (IANA) version number as Metadata.- Parameters:
format (str) – Desired format of the response. Only
jsonformat is supported. “json” Default value is “json”.- Returns:
JSON object
- Return type:
JSON
- Raises:
Example
# response body for status code(s): 200 response == { "Version": "str" }
- get_timezone_by_coordinates(format: str = 'json', *, coordinates: List[float], accept_language: str | None = None, options: str | None = None, time_stamp: datetime | None = None, dst_from: datetime | None = None, dst_lasting_years: int | None = None, **kwargs: Any) MutableMapping[str, Any][source]¶
Use to get the current, historical, and future time zone information for the specified latitude-longitude pair.
The
Get Timezone By CoordinatesAPI is an HTTPGETrequest that returns current, historical, and future time zone information for a specified latitude-longitude pair. In addition, the API provides sunset and sunrise times for a given location.- Parameters:
format (str) – Desired format of the response. Only
jsonformat is supported. “json” Default value is “json”.- Keyword Arguments:
coordinates (list[float]) – Coordinates of the point for which time zone information is requested. This parameter is a list of coordinates, containing a pair of coordinate(lat, long). When this endpoint is called directly, coordinates are passed in as a single string containing coordinates, separated by commas. Required.
accept_language (str) – Specifies the language code in which the timezone names should be returned. If no language code is provided, the response will be in “EN”. Please refer to Supported Languages for details. Default value is None.
options (str) – Alternatively, use alias “o”. Options available for types of information returned in the result. Known values are: “none”, “zoneInfo”, “transitions”, and “all”. Default value is None.
time_stamp (datetime) – Alternatively, use alias “stamp”, or “s”. Reference time, if omitted, the API will use the machine time serving the request. Default value is None.
dst_from (datetime) – Alternatively, use alias “tf”. The start date from which daylight savings time (DST) transitions are requested, only applies when “options” = all or “options” = transitions. Default value is None.
dst_lasting_years (int) – Alternatively, use alias “ty”. The number of years from “transitionsFrom” for which DST transitions are requested, only applies when “options” = all or “options” = transitions. Default value is None.
- Returns:
JSON object
- Return type:
JSON
- Raises:
Example
# response body for status code(s): 200 response == { "ReferenceUtcTimestamp": "2020-02-20 00:00:00", "TimeZones": [ { "Aliases": [ "str" ], "Countries": [ { "Code": "str", "Name": "str" } ], "Id": "str", "Names": { "Daylight": "str", "Generic": "str", "ISO6391LanguageCode": "str", "Standard": "str" }, "ReferenceTime": { "DaylightSavings": "str", "PosixTz": "str", "PosixTzValidYear": 0, "StandardOffset": "str", "Sunrise": "2020-02-20 00:00:00", "Sunset": "2020-02-20 00:00:00", "Tag": "str", "WallTime": "str" }, "RepresentativePoint": { "Latitude": 0.0, "Longitude": 0.0 }, "TimeTransitions": [ { "DaylightSavings": "str", "StandardOffset": "str", "Tag": "str", "UtcEnd": "2020-02-20 00:00:00", "UtcStart": "2020-02-20 00:00:00" } ] } ], "Version": "str" }
- get_timezone_by_id(format: str = 'json', *, timezone_id: str, accept_language: str | None = None, options: str | None = None, time_stamp: datetime | None = None, dst_from: datetime | None = None, dst_lasting_years: int | None = None, **kwargs: Any) MutableMapping[str, Any][source]¶
Use to get the current, historical, and future time zone information for the specified IANA time zone ID.
The
Get Timezone By IDAPI is an HTTPGETrequest that returns current, historical, and future time zone information for the specified IANA time zone ID.- Parameters:
format (str) – Desired format of the response. Only
jsonformat is supported. “json” Default value is “json”.- Keyword Arguments:
timezone_id (str) – The IANA time zone ID. Required.
accept_language (str) –
Specifies the language code in which the timezone names should be returned. If no language code is provided, the response will be in “EN”. Please refer to Supported Languages for details. Default value is None.
options (str) – Alternatively, use alias “o”. Options available for types of information returned in the result. Known values are: “none”, “zoneInfo”, “transitions”, and “all”. Default value is None.
time_stamp (datetime) – Alternatively, use alias “stamp”, or “s”. Reference time, if omitted, the API will use the machine time serving the request. Default value is None.
dst_from (datetime) – Alternatively, use alias “tf”. The start date from which daylight savings time (DST) transitions are requested, only applies when “options” = all or “options” = transitions. Default value is None.
dst_lasting_years (int) – Alternatively, use alias “ty”. The number of years from “transitionsFrom” for which DST transitions are requested, only applies when “options” = all or “options” = transitions. Default value is None.
- Returns:
JSON object
- Return type:
JSON
- Raises:
Example
# response body for status code(s): 200 response == { "ReferenceUtcTimestamp": "2020-02-20 00:00:00", "TimeZones": [ { "Aliases": [ "str" ], "Countries": [ { "Code": "str", "Name": "str" } ], "Id": "str", "Names": { "Daylight": "str", "Generic": "str", "ISO6391LanguageCode": "str", "Standard": "str" }, "ReferenceTime": { "DaylightSavings": "str", "PosixTz": "str", "PosixTzValidYear": 0, "StandardOffset": "str", "Sunrise": "2020-02-20 00:00:00", "Sunset": "2020-02-20 00:00:00", "Tag": "str", "WallTime": "str" }, "RepresentativePoint": { "Latitude": 0.0, "Longitude": 0.0 }, "TimeTransitions": [ { "DaylightSavings": "str", "StandardOffset": "str", "Tag": "str", "UtcEnd": "2020-02-20 00:00:00", "UtcStart": "2020-02-20 00:00:00" } ] } ], "Version": "str" }
- get_windows_timezone_ids(format: str = 'json', **kwargs: Any) List[MutableMapping[str, Any]][source]¶
Use to get the list of Windows Time Zone IDs.
The
Get Windows Time ZonesAPI is an HTTPGETrequest that returns a full list of Windows Time Zone IDs.- Parameters:
format (str) – Desired format of the response. Only
jsonformat is supported. “json” Default value is “json”.- Returns:
list of JSON object
- Return type:
list[JSON]
- Raises:
Example
# response body for status code(s): 200 response == [ { "IanaIds": [ "str" ], "Territory": "str", "WindowsId": "str" } ]