I dont believe you can pass a var from js to php, at least not directly. what I do is set a value in the html with the js and pass the var from the html to php in a form. to make it subtle, I will use hidden forms.
setting cookies would work, that might be a work around, but generally not recommended.
the sample you linked is exactly what I told you to do(or maybe not, hell i don’t know, did i mention i hate jquery and it always confuses the crap out of me?). I can only explain what i know, and how i know how to do it, and i know it can give you your end result.
this one might explain better:
so for instance, use the js to set the value of the timezone using a hidden form, link the submit to say a button titled “set my timezone” with method post, then in the php get the post data, i.e. $_POST['user_timezone']
real world example:
a hidden form connected to a button:
js sets the value of said hidden form, from a select box on the page: