I need to implement a feature that would help me get GMT Time using users IP Address. Is there any kind of Web Service that would take IP address and give me GMT time for that IP?
Asked
Active
Viewed 3,717 times
0
-
2GMT time is always the same, no matter the IP address or the geographic location :-) Also you mean Java or Javascript as there is a slight difference? – Darin Dimitrov Jul 17 '11 at 08:29
-
3GMT Time is the same for everybody. I guess you mean the users current time? – Jacob Jul 17 '11 at 08:29
-
3Please don't add noise like *"Thanks in advance"* to posts. – Andrew Thompson Jul 17 '11 at 08:32
-
I meant the user's current time in Java's client side. As I don't want to store such data in DB. – Ali Taha Ali Mahboub Jul 17 '11 at 08:37
-
So do you want GMT or the user's current time in his own timezone? And what does the DB have to do with it? Your question remains unclear. – user207421 Jul 17 '11 at 08:43
-
I'm sorry for not being so unclear. I mean user's current time in his own timezone. – Ali Taha Ali Mahboub Jul 20 '11 at 11:23
2 Answers
3
As pointed out in How to get Time Zone through IP Address ... it is very difficult to deduce the time zome from the IP address. If you want to get the time zone from the current client connection, you can let the client send his timezone to the server. A good approximation is also to get the client's current local time and to compute the difference to the GMT at the server. This could also be done at each connection to accout for the daylight saving.
-
This is not for free. Plus it has limited requests. Do you recommend any other WS? – Ali Taha Ali Mahboub Jul 20 '11 at 09:20
1
You can check this: http://www.geobytes.com/iplocator.htm
it has an example on how to use from code and it has a timezone field in the results

Ido Weinstein
- 1,176
- 8
- 24