0

I understand that PHP's timezone functionality makes use of the Olson tz database, and I was wondering whether there was a way to access the database information myself more directly, in order to get more accurate information through the use of longitudes and latitudes.

I guess, alternatively, if there are any good PHP libraries that can provide me with a timezone when given coordinates, that would be good too. I tried google's api for this, but it is limited and rejected every request I made to it.

4

1 回答 1

1

tzdb 中唯一的坐标位于 zone.tab 中,并且只是每个示例城市的单个纬度/经度。这对于在地图上显示点很有用,但它不足以让您将任意纬度/经度解析为时区。

如果您在使用 Google 的 API 时遇到问题,您可以尝试发布这些具体问题或联系他们的支持。还有其他提供商,或者您可以构建自己的地理空间数据库以在本地解决它们。

您还应该查看我刚刚开始的有关此主题的社区 wiki 。

于 2013-04-18T15:25:19.013 回答