algorithm for getting time zone from geo coordinates

前端 未结 4 1431
春和景丽
春和景丽 2021-01-02 03:15

I want to write app where user can point any place on map (not only cities) and get timezone in that place.

What data structure (app will not have Internet connectiv

4条回答
  •  醉酒成梦
    2021-01-02 03:27

    Well, if accuracy is not a requirement, why bother with a data structure ? Write a function which, given a longitude, returns the offset, expressed in hours, from the Greenwich meridian.

    And if this doesn't work for you, I'd go with Joel Neely's answer.

提交回复
热议问题