从城市派生时区

Deriving the time zone from the city

本文关键字:时区 派生 城市      更新时间:2023-09-26

我正在开发一个应用程序,该应用程序通过对我无法修改的外部 Web 服务的 AJAX 调用,从表中的客户数据中获取客户的城市。城市通常格式化为"城市,国家"(例如"坦帕,美国")。在 JavaScript 中使用此信息,并且只有此信息才能获得客户所在的 GMT 偏移量和时区?

您可以对服务进行另一个 AJAX 调用,例如

  • https://www.mashape.com/seikan/timezonedb-find-local-time-zone-by-coordinate-or-name
  • http://www.worldweatheronline.com/time-zone-api.aspx
  • https://developers.google.com/maps/documentation/timezone/

就我的头顶而言,可能还有其他人,包括商业和免费。