 | 
January 29th, 2008, 09:04 AM
| | Newbie | | Join Date: Jan 2008
Posts: 17
| | Getting client TimeZone name in JavaScript
i want to get client TimeZone name .for ex .if i am changing my timezone to CST it should change in my prgm thru javascript,and then it has to show the TimeZone name and current time also..
| 
January 29th, 2008, 09:52 AM
|  | Site Moderator | | Join Date: Nov 2006 Location: UK
Posts: 12,964
| |
Welcome to TheScripts!
Use the Date object methods.
| 
February 5th, 2008, 05:45 AM
| | Newbie | | Join Date: Jan 2008
Posts: 17
| | Quote: |
Originally Posted by acoder | not the time.. i want to get the timezone name .. for Ex.. now i am using IST ,if i am changing the India Standard Time to Eastern standad Time it has To change to EST ..
| 
February 5th, 2008, 09:06 AM
|  | Site Moderator | | Join Date: Nov 2006 Location: UK
Posts: 12,964
| | Quote: |
Originally Posted by praveen1983 not the time.. i want to get the timezone name .. for Ex.. now i am using IST ,if i am changing the India Standard Time to Eastern standad Time it has To change to EST .. | Make use of getTimezoneOffset(), toLocaleString(), etc. to calculate it yourself.
| 
February 6th, 2008, 08:13 AM
| | Newbie | | Join Date: Jan 2008
Posts: 17
| | Quote: |
Originally Posted by acoder Make use of getTimezoneOffset(), toLocaleString(), etc. to calculate it yourself. | i dont want a time.. i need a Eastern standard time this name to be changed..when i change my timezone to another
| 
February 6th, 2008, 08:53 AM
|  | Site Moderator | | Join Date: Nov 2006 Location: UK
Posts: 12,964
| | Quote: |
Originally Posted by praveen1983 i dont want a time.. i need a Eastern standard time this name to be changed..when i change my timezone to another | I know you want a timezone name rather than a time. What I'm saying is that you'll have to calculate the name of the timezone using the time.
| 
February 7th, 2008, 10:10 AM
| | Newbie | | Join Date: Jan 2008
Posts: 17
| | Quote: |
Originally Posted by acoder I know you want a timezone name rather than a time. What I'm saying is that you'll have to calculate the name of the timezone using the time. | k.. thank u for ur posts & replies
| 
February 7th, 2008, 10:25 AM
|  | Site Moderator | | Join Date: Nov 2006 Location: UK
Posts: 12,964
| | Quote: |
Originally Posted by praveen1983 k.. thank u for ur posts & replies | No problem, glad to help. Post your solution here or, if you get stuck, post your code.
| 
March 27th, 2008, 07:28 PM
| | Newbie | | Join Date: Mar 2008
Posts: 1
| |
I have the similar issue:
I want to get the time zone name from JavaScript and use that in Java.
TimeZone tz =TimeZone.getTimeZone("timezonenamegotfromjavascript");
.
Thanks for your help.
- jd
| 
March 31st, 2008, 07:10 AM
|  | Site Moderator | | Join Date: Nov 2006 Location: UK
Posts: 12,964
| |
Read the answer I gave earlier. You'll have to program it yourself based on the time zone offset.
|  | | Thread Tools | Search this Thread | | | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | | | | What is Bytes?
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 205,248 network members.
|