Page 1 of 1

Mapping IP to Olson/zoneinfo database

Posted: Thu Feb 19, 2009 8:32 pm
by Popcorn
hello people, ok, so i swear i *have* looked but ...

i am using the Olson/zoneinfo/'tz database' database.

all i want is to be able to map the user IP to an entry (like Asia/Hong_Kong) in that database.

there are IP location services which can give me country, city, coordinates, etc.

and i can even get something like http://www.earthtools.org/webservices.htm#timezone to return "time zone and local time" from those coords.

i don't want any user input ... none of that dropdown business. I am using JS and PHP and using the JS offset and PHP's "timezone_name_from_abbr()" is close but cannot guarantee it (especially seeing as the fn has bugs, good grief). i don't really wanna manually map from the 'IP to location' CSV data that seems to be available, as that is static.. oh and manual.

i'd very much appreciate the link/technique that i have missed....