For the second part of the question, see the accepted answer to this question:
Determine timezone from latitude/longitude without using web services like Geonames.org
As stated in that answer, you should:
- Download the database of cities from geonames.org
- convert it to a compact lat/lon -> timezone list
- use an R-Tree implementation to efficiently lookup the nearest city (or rather, its
timezone) to a given coordinate
Keep in mind also that many U.S. states belong to a single time zone, which should make the job easier.