从经度和纬度获取PHP时区名称? [英] Get PHP Timezone Name from Latitude and Longitude?
本文介绍了从经度和纬度获取PHP时区名称?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有办法通过经纬度获取用户的时区?而不仅仅是偏移量,而是实际的时区。
Is there a way get the timezone of a user by their latitude and longitude? And not just the offset, but the actual timezone they're in.
基本上,我在寻找DateTimeZone :: getLocation的极性,它返回纬度和经过一段时间。
Essentially, I'm searching for the polar opposite of DateTimeZone::getLocation which returns the latitude and longitude for a certain timezone.
推荐答案
Geonames应该很好地完成这项工作:
Geonames should do the job nicely:
他们也有一个php库。
They've also got a php library.
这篇关于从经度和纬度获取PHP时区名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文