ActionScript 3 Dates are actually "DateTime" instances and always have a
timezone. Dates are always shown in the local timezone in Flash, this
isn't Flex specific. You have to use the UTC specific accessors in
ActionScript to get the time in UTC / Zulu / GMT time. There is no
record of the original timezone that was used to construct the Date.
 
Serialization formats often send dateTime information in UTC to keep
things simple - either endpoint can adjust the time on display as
necessary.
 
Note that there are a few bugs in how timezone-less date, time and
dateTime XML Schema types are handled in Flex WebService that should be
fixed in the new implementation of Flex SDK 2.0.1 Hotfix 2 which is due
out soon. However, this isn't necessarily related to your dateTime as it
has a timezone specified.
 
Pete

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of paulwelling
Sent: Wednesday, May 16, 2007 6:42 PM
To: [email protected]
Subject: [flexcoders] Date - Timezone with WS



Hello,

I have a WS that returns a date. Our server is in EDT.
Using Charles to sniff the date: 2007-05-15T00:00:00-04:00

When debugging the resultset in Flex, it appears that Flex has ignored
TZ info passed and has applied the client's TZ to the date..! 

(I changed my PC's TZ to GMT and the TZ offset in the resultset gets
changed accordingly, even though the server is still passing -04:00!!!)

Has anyone come up with a good work-around / fix for this... (I'm
still in shock on this one...)

Thanks for the help!
Paul



 

Reply via email to