File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes Getting system timezone in Javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Getting system timezone in Javascript" Watch "Getting system timezone in Javascript" New topic

Getting system timezone in Javascript

Sayantan Majumdar

Joined: Sep 28, 2008
Posts: 16

I want to know if I can get the system time zone in Javascript. I am able to get the timezone offset by calling getTimezoneOffset. But this gives me the difference between the local time and UTC. Is it possible to get the timezone ID (expanded/ short) like "US/Pacific" or "PST".

Thanks in advance.
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
This is what you have to work with:

I agree. Here's the link:
subject: Getting system timezone in Javascript
jQuery in Action, 3rd edition