Win a copy of Functional Reactive Programming this week in the Other Languages 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