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.

Results 1 to 4 of 4

Thread: Time Zones

  1. #1
    Forum VIP
    Join Date
    Jul 2010
    Posts
    1,669
    Thanks
    25
    Thanked 327 Times in 304 Posts

    Default Time Zones

    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/


  2. #2
    Member
    Join Date
    Apr 2012
    Location
    Superior, CO, USA
    Posts
    80
    Thanks
    0
    Thanked 14 Times in 14 Posts

    Default Re: Time Zones

    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!

  3. #3
    Forum VIP
    Join Date
    Jul 2010
    Posts
    1,669
    Thanks
    25
    Thanked 327 Times in 304 Posts

    Default Re: Time Zones

    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/

  4. #4
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,308
    Thanks
    181
    Thanked 824 Times in 767 Posts
    Blog Entries
    5

    Default Re: Time Zones

    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).

Similar Threads

  1. [SOLVED] How much time should I have on a program?
    By SOG in forum Java Theory & Questions
    Replies: 17
    Last Post: July 19th, 2011, 05:28 PM
  2. First Time
    By rayoung17 in forum Member Introductions
    Replies: 1
    Last Post: April 4th, 2011, 01:52 PM
  3. First time in forum
    By prasanth1216 in forum Member Introductions
    Replies: 0
    Last Post: December 19th, 2010, 12:45 PM
  4. 1st time using methods
    By gonfreecks in forum What's Wrong With My Code?
    Replies: 5
    Last Post: December 1st, 2010, 01:37 PM
  5. Using time
    By ellias2007 in forum Java Theory & Questions
    Replies: 1
    Last Post: September 4th, 2010, 08:48 AM