faqts : Computers : Programming : Languages : JavaScript : Language Core : Dates

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

24 of 31 people (77%) answered Yes
Recently 8 of 10 people (80%) answered Yes

Entry

How do I find the timezone of the machine js is executed on?
How do I find the timezone of a Date?

May 10th, 2001 09:59
jsWalter, Martin Honnen,


The Date object has a method
  getTimezoneOffset
which returns the difference to GMT time in minutes. For instance in 
Western Europe during summer time 
  var now = new Date();
  alert(now.getTimezoneOffset());
shows
  -120
wt 5/10/01
I have a collection of methods that extend the Date Object.
One of them solves this problem.
ww.torres.ws/javascript
Walter