This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting system timezone in Javascript

 
Sayantan Majumdar
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is what you have to work with: http://www.w3schools.com/jsref/jsref_obj_date.asp

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic