When we search google for "Time Texas" it returns the local time for Texas and its same for any location in the world. It calculated the correct time with day light savings adjustment etc.
How can we make a similar call using the Google search JavaScript API and get the time开发者_JAVA百科 for any given location.
As far a i know there isn't one offered by google. I haven't personally used this http://www.worldweatheronline.com/time-zone-api.aspx but it seems to offer everything you need.
Or if you just needed the timezone of the user rather than searching for the timezone of a place, you could always use the datejs lib.
精彩评论