I am working on php site i have to show date and time after user login in header section. The problem is that I have to set a default timezone in datetimezone() function php. I have server of USA and I want if anyone is accessing this site in UK then it should show his/her datetime according to his location, I have used the way of getting IP address of client, but it did not work.
Asked
Active
Viewed 50 times
0
-
use this get local time var now = new Date(); – shas Sep 03 '16 at 13:03
-
http://stackoverflow.com/questions/10659523/how-to-get-the-exact-local-time-of-client – shas Sep 03 '16 at 13:03
-
4Maybe this previous post is exactly what you need: [get user timezone](http://stackoverflow.com/questions/4746249/get-user-timezone) – Blazeag Sep 03 '16 at 13:58