0

我有一个城市州邮政编码的列表。PHP中有没有一种方法可以传递其中一些值并返回时区ID?

例如,如果我经过内华达州,我会得到“America\Los_angels”作为回报。

能做到这一点的是PHP类吗?或者我需要使用谷歌地图等外部 API?

谢谢

4

1 回答 1

0

There is no such function in PHP. But you could do it yourself.

Take database of zip codes and states(Example: http://en.wikipedia.org/wiki/List_of_ZIP_code_prefixes), take database of timezones and states(Example: statoids.com/tus.html), combine it to new one.

Or.

You can use some webservice (Example: webservicex.net/uszip.asmx) for direct use or for build your own database.

于 2013-06-25T00:34:09.407 回答