Re: Problem with GMT offset.
Do you know how you would do this without a program? As in, if you had to do this using only a piece of paper and a pencil (and whatever other resource), would you know how?
If so, write out what you would do, and you'll have a pretty close approximation to an algorithm.
If not, google is your friend. I don't really understand what the problem is, so perhaps writing out your problem a little more clearly would help also.
Re: Problem with GMT offset.
OK ..The thing is i need java code to find GMT offset for a given latitude and longitude. But Gmt should be country based in which the given city exists. f
For ex:
If i give lat longs for Mumbai(city), i should get India GMT(country) not the mumbai gmt,because mumbai is in India. Reason is except some countries each country has only one GMT .
Re: Problem with GMT offset.
The short answer to your question is: no, there isn't an easy way to do this.
You're going to need to rely on a webservice that gives you the timezone for a given city, or a data structure that does the same, possibly from a third party library.
Other than that, google is your friend.
Re: Problem with GMT offset.
Okay, is there any web service code to find city/place name by using inputs as latitude and longitude?
Re: Problem with GMT offset.
Quote:
Originally Posted by
sush
Okay, is there any web service code to find city/place name by using inputs as latitude and longitude?
Probably. Like I said, for questions like that, google is your friend. We would just be doing the googling for you, which isn't smart because you know your requirements better than we do.