Hi, I was curious if anyone knew of any java standard library classes or methods that would return some sort of indicator of a time zone, given geographical coordinates. I don't want to reinvent the wheel if it's not necessary.
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
Hi, I was curious if anyone knew of any java standard library classes or methods that would return some sort of indicator of a time zone, given geographical coordinates. I don't want to reinvent the wheel if it's not necessary.
NOTE TO NEW PEOPLE LOOKING FOR HELP ON FORUM:
When asking for help, please follow these guidelines to receive better and more prompt help:
1. Put your code in Java Tags. To do this, put [highlight=java] before your code and [/highlight] after your code.
2. Give full details of errors and provide us with as much information about the situation as possible.
3. Give us an example of what the output should look like when done correctly.
Join the Airline Management Simulation Game to manage your own airline against other users in a virtual recreation of the United States Airline Industry. For more details, visit: http://airlinegame.orgfree.com/
askgeo.com seems like a possibility. Never used it myself though and it is commercial for commercial use.
This thread has a bunch of other suggestions.
Last edited by stdunbar; May 9th, 2012 at 09:16 PM.
Need Java help? Check out the HotJoe Java Help forums!
Well, I have over 600 coordinates that I need to get timezones for. It can be a one time only sorta thing, and I can just store the data for future use. If there is no really basic way of doing it, I may be able to automatically query some sort of online script and scan the resulting html page for the information I'm after.
Does anyone know any websites that takes coordinates in the url and returns a page with the location's timezone? Maybe even a search engine that does it?
My alternative is to just approximate them.
NOTE TO NEW PEOPLE LOOKING FOR HELP ON FORUM:
When asking for help, please follow these guidelines to receive better and more prompt help:
1. Put your code in Java Tags. To do this, put [highlight=java] before your code and [/highlight] after your code.
2. Give full details of errors and provide us with as much information about the situation as possible.
3. Give us an example of what the output should look like when done correctly.
Join the Airline Management Simulation Game to manage your own airline against other users in a virtual recreation of the United States Airline Industry. For more details, visit: http://airlinegame.orgfree.com/
Here's one web service:
EarthTools: Webservices
I'm not sure if the google maps API also has this service, but it might be worth looking into.
This also may not be too hard to implement yourself...I can almost guarantee that timezone coordinates can be downloaded in some format (for instance KML). In java, you can read these in and define a Shape based upon the coordinates, then with a lat/lng query defined as a Point query (using the contains() method) which Shape contains the coordinates (and Map the Shape to the timezone).