2011-01-12 35 views
4

我有一個地理位置對經度/緯度,有沒有任何方式/工具來獲得相應的時區?來自地理位置的時區

+2

已經問。 http://stackoverflow.com/questions/41504/timezone-lookup-from-latitude-longitude – jro 2011-01-12 14:41:35

回答

3

一個名爲EarthTools的網站有一個Web服務。

http://www.earthtools.org/webservices.htm#timezone

可以在經度和緯度通過像這樣:

^h TTP://www.earthtools.org/timezone/40.71417/-74.00639

它吐出時區和一堆其他信息:

<?xml version="1.0" encoding="ISO-8859-1" ?> 
<timezone xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.earthtools.org/timezone.xsd"> 
    <version>1.1</version> 
    <location> 
     <latitude>40.71417</latitude> 
     <longitude>-74.00639</longitude> 
    </location> 
    <offset>-5</offset> 
    <suffix>R</suffix> 
    <localtime>4 Dec 2005 12:06:56</localtime> 
    <isotime>2005-12-04 12:06:56 -0500</isotime> 
    <utctime>2005-12-04 17:06:56</utctime> 
    <dst>False</dst> 
</timezone>