How to get zipcode - timezone data using python?

I am looking for a python package that can provide the following functions:

timezone = foo.gettimezoneinfo(zipcode) date_time = foo.convert_time(datetime object, zipcode) 

Is there such a package? If not, how can I implement it? Can I use any zipcode database - timezone?

I need to use this with the Asiads of the USA and Canada.

Thanks.

+4
source share
1 answer

Take a look at pyzipcode . It was updated on 2010-09-06, so I would suggest that this is pretty accurate. I have never used it, but it looks pretty simplistic. If you encounter problems; I can check it out and post some source code.

Under Basic Use there is code that I believe will satisfy your request.

+3
source

Source: https://habr.com/ru/post/1337841/


All Articles