I think the getTimezoneOffset actually takes care of Daylight savings. I vaguely remember working on an application where I was checking the offset and it returned 7hrs vs 8hrs (PST zone) for before and after the daylight savings change. Again, I might be wrong. Can someone confirm?
--- In [email protected], coder3 <[EMAIL PROTECTED]> wrote: > > > Hi, > > there might be an another way to convert the UTC to local time zone other > than the following. because this doesn't take care the daylight saving time. > any suggestions? > > > > > // creates a Date in local time > var nextDay:Date = new Date("Mon May 1 2006 11:30:00 AM"); > > // converts the Date to UTC by adding or subtracting the time zone offset > var offsetMilliseconds:Number = nextDay.getTimezoneOffset() * 60 * 1000; > nextDay.setTime(nextDay.getTime() + offsetMilliseconds); > > > > -- > View this message in context: http://www.nabble.com/convert-the-Date-to-local-time-zone-tp14428505p14428505.html > Sent from the FlexCoders mailing list archive at Nabble.com. >

