This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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
Author

Getting system timezone in Javascript

Sayantan Majumdar
Greenhorn

Joined: Sep 28, 2008
Posts: 16
Hi,

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
author
Rancher

Joined: Nov 08, 2001
Posts: 15385
    
    6
This is what you have to work with: http://www.w3schools.com/jsref/jsref_obj_date.asp

Eric
 
Have you checked out Aspose?
 
subject: Getting system timezone in Javascript
 
It's not a secret anymore!