Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

country to timezone lookup #5

Open
coolchevy opened this issue Feb 21, 2013 · 2 comments
Open

country to timezone lookup #5

coolchevy opened this issue Feb 21, 2013 · 2 comments

Comments

@coolchevy
Copy link

May be you add country to timezone lookup by geoip

my list here
https://gist.github.com/coolchevy/5004029

I use it for auto set timezone to clients on my site.

commented which not presents in your tz_database

Thank you for your project!

@dmitryme
Copy link
Owner

Hello,
don't know what is geoip at all :). (detect placement by IP?). Some services by IP address return pair {"US"(or something), <some 2 symbol tag>}. Is it corrent? How did you get you list? Is it possible to get this information automatically?

@coolchevy
Copy link
Author

Hi!

don't know what is geoip at all :).
(detect placement by IP?).

yes

Some services by IP address return pair {"US"(or something), }. Is it corrent?

yes, It is by REST API or lookup from local database
for example
http://www.maxmind.com/en/geolocation_landing
http://ru.smart-ip.net/geoip-api
http://geoip.pidgets.com/
http://freegeoip.net/static/index.html
http://wiki.nginx.org/HttpGeoipModule

How did you get you list? Is it possible to get this information automatically?

you can get country code by ip via many geoip services. Most popular is maxmind

my suggestion is using database from maxmind (or your own database)
http://dev.maxmind.com/static/csv/codes/time_zone.csv
to resolve timezone by country code from geoip service

https://gist.github.com/coolchevy/5004029

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants