-1

I want to detect that from which country and form which timezone my website is opened by user using java script or Jquery

juhi
  • 320
  • 1
  • 3
  • 15
  • Also this other [thread](http://stackoverflow.com/questions/3489460/how-to-get-visitors-location-i-e-country-using-javascript-geolocation) – vsgoulart Feb 20 '14 at 06:33
  • And [this one](http://stackoverflow.com/q/6939685/1810429). – J0e3gan Feb 20 '14 at 06:35
  • Possible solution? http://stackoverflow.com/questions/8867369/how-to-access-geo-ip-look-up-with-javascript – comdotlinux Feb 20 '14 at 06:36
  • 1
    A [simple web search](http://www.bing.com/search?setmkt=en-US&q=detect+requester+location+and+timezone+with+javascript) immediately returns what seem to be usable possibilities, some of them on SO as the "possible duplicate" comments indicate: if your situation is subtly different, please explain. Regardless, try to explain what you have tried, what is not working or does not suit your specific needs etc. – J0e3gan Feb 20 '14 at 06:37

1 Answers1

2

Timezone is possible to get with Javascript alone, country is not possible without a third-party service or server-side process like GeoIP:

var timezone = new Date().toString().match(/\(([A-Z]+)\)$/).pop()

Rob M.
  • 35,491
  • 6
  • 51
  • 50