View Single Post
  #5 (permalink)  
Old Dec 29th, 2007, 19:53
Eran Eran is offline
Junior Member
Join Date: Oct 2007
Location: Israel
Age: 21
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Re: ASP Capturing User Time Zone

do it on javascript.
make countries array (country, value, GMT) and loop it to a select box.
then make the "if" term

PHP: Select all

if (countries_arr("GMT") = user_GMT)
  
document.write "selected='selected'"
i think i got errors on that code O_o
simple thought :}


now, how do we get the user GMT?
PHP: Select all

var = new Date()
var 
gmtHours d.getTimezoneOffset()/60;
document.write("The local time zone is: GMT " gmtHours); 
learn js :P

____________
look on the samples here - DateDiff
Reply With Quote