Hi,
I'd like to use javascript to obtain a user's timezone setting on their local machine. here is the code that I currently have:
var mydate = new Date();
mydate.getTimezoneOffset()/60;
this code returns a number with a decimal value. It's sort of what I want, but not examply.
One timezone might be known as "+5:45" ...how would I get javascript to show the user's timezone as "+5:45" and NOT as "5.75" ? Basically, I want the timezone to show the number to the right of the decimal as the minutes (and not as a hundredths value)
Thank you in advance for any tips. Source code is greatly appreciated.
I'd like to use javascript to obtain a user's timezone setting on their local machine. here is the code that I currently have:
var mydate = new Date();
mydate.getTimezoneOffset()/60;
this code returns a number with a decimal value. It's sort of what I want, but not examply.
One timezone might be known as "+5:45" ...how would I get javascript to show the user's timezone as "+5:45" and NOT as "5.75" ? Basically, I want the timezone to show the number to the right of the decimal as the minutes (and not as a hundredths value)
Thank you in advance for any tips. Source code is greatly appreciated.