I don't see targettimezoneid
documented anywhere. Did you mean to use query
? The following works https://dev.virtualearth.net/REST/V1/TimeZone/?query=America/los_angeles&key=[Your Bing Maps Key]
Bing Map Time zone API not working as expected.
When we call the https://dev.virtualearth.net/REST/V1/TimeZone/?targettimezoneid=America/los_angeles&key=Apikey
Instead of getting the a response body with utcOffset and dstRule i get a response status code as 200 with blank body.
Can you please tell me know the reason for this.
5 answers
Sort by: Most helpful
-
rbrundritt 15,211 Reputation points Microsoft Employee
2022-07-05T15:08:33.123+00:00 -
Deepak Roy 1 Reputation point
2022-07-18T06:57:03.257+00:00 If we refer the below blog it does have a targettimezoneid that returns complete information about a time zone.
https://blogs.bing.com/maps/2018-08/bing-maps-time-zone-api-working-with-time-zones -
Deepak Roy 1 Reputation point
2022-07-27T13:00:11.373+00:00 We have an use case of where we would need to know the day light saving time along with the UTC off set.
So do we have any API that can give this information. As mentioned earlier we had an API in the blog which was helpful for us. -
IoTGirl 2,976 Reputation points Microsoft Employee
2022-07-28T16:25:52.013+00:00 Please review: https://learn.microsoft.com/en-us/bingmaps/rest-services/timezone/find-time-zone and try the call Ricky suggested.
The sample result shows UTC Standard and Daylight:
"__type": "RESTTimeZone:http://schemas.microsoft.com/search/local/ws/rest/v1", "timeZoneAtLocation": [ { "placeName": "Vancouver, BC", "timeZone": [ { "genericName": "Pacific Standard Time", "abbreviation": "PST", "ianaTimeZoneId": "America/Vancouver", "windowsTimeZoneId": "Pacific Standard Time", "utcOffset": "-8:00", "convertedTime": { "localTime": "2018-08-06T12:54:46", "utcOffsetWithDst": "-7:00", "timeZoneDisplayName": "Pacific Daylight Time", "timeZoneDisplayAbbr": "PDT" } } ] } ]
-
IoTGirl 2,976 Reputation points Microsoft Employee
2022-08-06T03:21:25.837+00:00 Take a look at the next API in the docs..https://learn.microsoft.com/en-us/bingmaps/rest-services/timezone/convert-local-time-zone