469,277 Members | 2,357 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,277 developers. It's quick & easy.

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..
Jan 29 '08 #1
9 17998
acoder
16,027 Expert Mod 8TB
Welcome to TheScripts!

Use the Date object methods.
Jan 29 '08 #2
Welcome to TheScripts!

Use the Date object methods.
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 ..
Feb 5 '08 #3
acoder
16,027 Expert Mod 8TB
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.
Feb 5 '08 #4
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
Feb 6 '08 #5
acoder
16,027 Expert Mod 8TB
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.
Feb 6 '08 #6
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
Feb 7 '08 #7
acoder
16,027 Expert Mod 8TB
k.. thank u for ur posts & replies
No problem, glad to help. Post your solution here or, if you get stuck, post your code.
Feb 7 '08 #8
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
Mar 27 '08 #9
acoder
16,027 Expert Mod 8TB
Read the answer I gave earlier. You'll have to program it yourself based on the time zone offset.
Mar 31 '08 #10

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

9 posts views Thread by Allen Davis | last post: by
2 posts views Thread by asad | last post: by
14 posts views Thread by Ankit Aneja | last post: by
8 posts views Thread by =?Utf-8?B?QkRSaWNoYXJkc29u?= | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.