I wrote a function using jQuery and PHP that I have tested.
On the PHP page where you are want to have the timezone as a variable, have this snippet of code somewhere near the top of the page:
<?php session_start(); $timezone = $_SESSION['time']; ?>
This will read the session variable "time", which we are now about to create.
On the same page, in the
<head>, you need to first of all include jQuery:
Also in the
<head>, below the jQuery, paste this:
You may or may not have noticed, but you need to change the url to your actual domain.
One last thing. You are probably wondering what the heck timezone.php is. Well, it is simply this: (create a new file called **timezone.php** and point to it with the above url)
<?php session_start(); $_SESSION['time'] = $_GET['time']; ?>