1

I want to get the timezone of current surfer or user which is using the website. Like (GMT-6). Actually I have to put some check on users of Tulsa Oklahoma so some user in that state is using the website will come under that check.

I think if i become able to get GMT difference like -6 then I can put check. I want to do this thing preferably in php but can consider javascript also.

Thanks in advance.

  • http://php.net/manual/en/function.timezone-location-get.php – Muhammad Faizan Uddin Dec 14 '16 at 11:15
  • First you need to use GeoIp to get the user location from their IP (which of course is not 100% reliable), and then from that you can derive the time zone. – laurent Dec 14 '16 at 11:24
  • First of all the php script is always translated into html on the server befor it is sent to the user, so i am not sure you can use it to get the time of the users timezone. With Javascript it should be possible, because javascript is a client-side scripting language. http://stackoverflow.com/questions/1091372/getting-the-clients-timezone-in-javascript – Burtscher_Florian Dec 14 '16 at 11:15

0 Answers0