Hi guys,
When I do a
echo gmdate('h:i:s',time());
I didn't get the correct time due to the time zone issue.
Is it possible/Is there any way to get the time zone of a site visitor and make the appropriate adjustment to gmdate ?
try this
echo gmdate('h:i:s',time()+(3600*tz));
tz should be the users timezone i usually have the format of +1 and -1 etc it doesnt matter much if the + is there however the -1 is required.
3600 is just how many seconds are in 1hr
only way possible is to either ask the user what thier timezone is, or try to use javascript to fetch the value, and then send it to php.
im sure a google search for "php javascript timezone" or similar would show examples.