时区来自地理位置 [英] Timezone from geolocation

查看:126
本文介绍了时区来自地理位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个地理位置对经度/纬度,有什么方法/工具来获得相应的时区?

I have a geolocation pair latitude/longitude, is there any way/tool to get the corresponding time zone?

推荐答案

一个名为EarthTools的网站有一个Web服务。

A website called EarthTools has a web service for that.

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

您可以像这样传递经纬度:

You can pass in latitude and longitude like so:


h ttp:// www .earthtools.org / timezone / 40.71417 / -74.00639

它会将时区和其他一些信息吐出: p>

And it spits out the time zone and a bunch of other info:

<?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>

这篇关于时区来自地理位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆