-1

Please refer this Link

This API Call passes the location in request, and get the response with the details in JSON/XML

eg : Request

https://maps.googleapis.com/maps/api/timezone/json?location=39.6034810,-119.6822510&timestamp=1331161200&key=YOUR_API_KEY

Response

{ "dstOffset" : 0, "rawOffset" : -28800, "status" : "OK", "timeZoneId" : "America/Los_Angeles", "timeZoneName" : "Pacific Standard Time" }

I want to pass the "timeZoneId" in request Parameter and and fetch "timeZoneName" and if possible other details in Output.

Something like this :

Request :

https://maps.googleapis.com/maps/api/timezone/json?timeZoneId=America/Los_Angeles,-119.6822510&timestamp=1331161200&key="Your Api Key"

Response

{
   "dstOffset" : 0,
   "rawOffset" : -28800,
   "timeZoneName" : "Pacific Standard Time"
}

Is there any way to achieve this?

Thanks in advance.

Abhii
  • 295
  • 2
  • 6
  • 18
  • Currently, Google Maps API doesn't have such option. Probably you can create a feature request in public [issue tracker](https://code.google.com/p/gmaps-api-issues/issues/list?can=2&q=apitype%3ATimeZoneAPI&sort=-stars&colspec=ID+Type+Status+Introduced+Fixed+Summary+Internal+Stars&cells=tiles). – xomena Sep 19 '16 at 11:26
  • Thanks for Confirming @xomena :) Is there any other way to achieve the same apart from google maps api. – Abhii Sep 19 '16 at 11:53
  • What language are you using? You don't need to go back to google for this. For example, if you're using .net, you can use [this library](https://github.com/mj1856/TimeZoneNames). There are others for other languages as well. – Matt Johnson-Pint Sep 21 '16 at 22:31
  • I want it in Perl or javascript. Is there any API call to Dot Net Library? – Abhii Sep 22 '16 at 09:04

1 Answers1

0

There is no way to achieve it for now using google map api's.

A request for new feature enhancement has been raised here

https://code.google.com/p/gmaps-api-issues/issues/detail?id=10521&thanks=10521&ts=1474285846

Abhii
  • 295
  • 2
  • 6
  • 18