Hi,
You can set cookies through PHP if you want too. Id recommend using PHP to set your cookie because mine uses php to get timezone.
The best way to do this would to have the user select their timezone. Something like this:
PHP Code:
<?php
if( isset( $_COOKIE['timezone'] ) )
{
$timezone = $_COOKIE['timezone'];
}
else
{
if( isset( $_POST['set_timezone'] ) )
{
setcookie( 'timezone', $_POST['timezone'], ( time( ) + 3600000 ) );
}
else
{
echo '<form action="post" action="' . $_SERVER['PHP_SELF'] . '">
Select your timezone: <select name="timezone">
</select>
<input type="submit name="set_timezone" value="Set Timezone" />
</form>
';
}
}
?>
I haven't tested the above code but it should work.