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
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: 15376
This is what you have to work with: http://www.w3schools.com/jsref/jsref_obj_date.asp

I agree. Here's the link: http://aspose.com/file-tools
subject: Getting system timezone in Javascript
Similar Threads
Convert Date from one timezone to another
How to get country name for a particluar TimeZone object??
To extract the timezone from the system
TimeZone and Daylight Saving Time
Time zone problem