On Fri, 2006-07-07 at 08:16 +0700, Paul Hastings wrote:

> and i guess you could get the lat/long from google maps or one of the 
> geocoding 
> webservices (if you're in the US/Canada/Europe). or one of the place name 
> databases like http://geonames.usgs.gov/domestic/index.html for the US or 
> http://earth-info.nga.mil/gns/html/index.html for the rest of the world.

You actually need (1) the lat/long of every city listed in the OlsenDB,
(2) the lat/long of the Province in question and (3) a method to map
from one Province to a TZ exemplar city.  That is just a mess of data.

If you want to go from arbitrary Country/Province you'd have to have
a real boundary maps of TZs and the provinces thus you'd want to pay
someone like Paul Hastings mentioned.

> manifold GIS: http://www.manifold.net/products/maps_and_data_home.html  you'd 

> for something a bit coarser, icu4j provides a get tz by country via 
> com.ibm.icu.util.TimeZone getAvailableIDs() method by passing in a 2-letter 
> ISO 
> country code. it seems to work well. it's based on the CLDR.

The way to cut the gordian knot is to skip asking for the users province
and just go with either all available TZs or all available TZs within a
country.

You must also be careful about what Country you use.  If a user says
fr_CA (French Canadian) what does that say about where they are located?

"fr_CA" might be a good language choice, but might not suggest anything
about the appropriate TZ choice or even that the user is in Canada.

-Paul



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Joda-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/joda-interest

Reply via email to