rough estimate of the time offset from GMT from latitude longitude

前端 未结 3 1963
故里飘歌
故里飘歌 2021-02-19 19:25

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:50

    offset = direction * longitude * 24 / 360
    

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

提交回复
热议问题