开发者

How can I get the timezone of given gps coordinates on iPhone?

开发者 https://www.devze.com 2022-12-12 14:14 出处:网络
My question is simple. I have the GPS coordin开发者_开发知识库ates of a place and I need to know, in what time zone (and daylight saving settings) is on that place. Is any easy solution for this probl

My question is simple. I have the GPS coordin开发者_开发知识库ates of a place and I need to know, in what time zone (and daylight saving settings) is on that place. Is any easy solution for this problem in objective c?


It doesn't look like the MKReverseGeocoder class added in MapKit with 3.0 will give you such information, unfortunately. That might make for a good Radar enhancement request, eh? (http://bugreporter.apple.com)

However, with a quick Google search, I found http://www.earthtools.org/webservices.htm#timezone - it appears you could query that and get a nice XML result back. Just be sure to obey the usage restrictions listed at the top of that page.


DRT Engine can give you a timezone offset based on latitude/longitude coordinates and a datetime value.


Geonames.org has a REST style free web service that provides geolocation to timezone conversion under CC attribution license. Response is XML or JSON.

0

精彩评论

暂无评论...
验证码 换一张
取 消