This isn't specifically a PHP question but since that's what our app is using, I thought I'd start here. The application we're developing requires time stamps on certain things and they need to be based on the user's actual time. Obviously we can collect time zone info when they register but are there some behind the scenes way to get the information from the zip code they give us? Preferably something free.
Were it me, i'd use a database (GeoNames puts out a TSV file for the US: http://www.geonames.org/export/zip/US.zip ) to translate Zip to State, and then map State to time zone (geoip_time_zone_by_country_and_region)
Wouldn't this have to assume that the user has their clock set correctly?
and that the user never went on a business trip or vacation....
This is why you use geoIp to get their starting location (if you want) but allow them to enter their own zip if they see that it is incorrect, you can still use geoIp to obtain info based on that rather than IP
This topic is now closed. New replies are no longer allowed.