rough estimate of the time offset from GMT from latitude longitude

前端 未结 3 1549
有刺的猬
有刺的猬 2021-02-19 19:36

Is there a way to estimate the offset from GMT (or time zone) from a latitude/longitude? I\'ve seen geonames, but this would need to work long term and we don\'t really want to

3条回答
  •  清酒与你
    2021-02-19 19:53

    offset = direction * longitude * 24 / 360
    

    where direction is 1 for east, -1 for west, and longitude is in (-180,180)

提交回复
热议问题