0

I want to get the timezone of a location based on its coordinates without connecting to an external api. is that possible in python? I already tried to install pytzwhere without success.

Walid Saad
  • 951
  • 1
  • 8
  • 14
  • In what way your use of pytzwhere wasn't successful? I think it's the way to perform timezone lookup based on coordinates using Python. – juhist Mar 24 '15 at 14:38
  • pytzwhere is a huge package, I was wondering if there is something lighter – Walid Saad Mar 24 '15 at 20:00
  • 1
    Well, considering that coordinate->timezone mapping is everything but simple, I'm not at all surprised that pytzwhere is a huge package. – juhist Mar 24 '15 at 20:53
  • You may invent the wheel, and do your own parsing on the data in tz_world or tz_world_mp from http://efele.net/maps/tz/world/. – boardrider Mar 25 '15 at 09:37
  • You may also want to read http://stackoverflow.com/questions/41504/timezone-lookup-from-latitude-longitude or http://stackoverflow.com/questions/16086962/how-to-get-a-time-zone-from-a-location-using-latitude-and-longitude-coordinates – boardrider Mar 25 '15 at 09:44

1 Answers1

1
from tzwhere import tzwhere

print tzwhere.tzwhere().tzNameAt(38.897663,-77.036562)

America/New_York

Nizam Mohamed
  • 8,751
  • 24
  • 32