hi, I want my users to put there GMT time while registration so that I can do some manipulation over it. But my problem after getting the GMT of a user how I'll get the time of that user's GMT. is there any way to compare the two GMT and get the actual time. here you know GMT of both user and server and server time. now we need to calculate users time. how to do this please help.
you can get user time and gmt zone using this <input name="time" id="time" type="text"> <script language="javascript" type="text/javascript"> var curdate = new Date() document.getElementById("time").value = curdate; </script> HTML: get this data with form submit, n do precess. as per your needs!
You cannot get the user's time using solely PHP, the most accurate you could get would be an IP Lookup or reading the headers sent by the browser (but AFAIK no mainstream browser sends details about the time of the computer...) Just give them a Timezone option...
@Danltn hey thanks. So now If I give the option to user and take there GMT now how I'll calculate there time only with there GMT??