gpt4 book ai didi

ruby-on-rails - 来自地理位置的时区

转载 作者:数据小太阳 更新时间:2023-10-29 07:35:05 26 4
gpt4 key购买 nike

我有一个地理定位对纬度/经度,有什么方法/工具可以得到相应的时区吗?

最佳答案

名为 EarthTools 的网站提供了相应的网络服务。

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>

关于ruby-on-rails - 来自地理位置的时区,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4669366/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com