I have a Date() object that contains a UTC date, which I need converted to the users local timezone. Does anybody know how I could do this? :-)
Date()
I'm pretty sure it is done for you automatically.
>>> d = new Date('Fri, 10 Jun 2011 19:49:23 UTC'); Sat Jun 11 2011 07:49:23 GMT+1200 (New Zealand Standard Time) >>> d.getHours(); 7