Can you be sure that all of the dates that come from that server will be sent in the timezone of that server? If they're -4 hours behind GMT / UTC, then you know that 2007-05-15T00:00:00-04:00 is the same as: 2007-05-15T04:00:00Z However, if you're -7 hours behind GMT / UTC, for example, then this time is seen as: 2007-05-14T21:00:00-07:00 All of these three times are equivalent but just in different timezones. A problem arises if your code, or perhaps some UI component that you're using to display dates, only considers the date portion of this dateTime... then you're not really getting an accurate picture of the point in time in which this dateTime refers. If you're only interested in the date and not the time, then you can always send individual values for YYYY, MM and DD (or use xsd:date and not xsd:dateTime). If you can't change the webservice... then you'll need a way to query the remote timezone and make adjustments accordingly (i.e. for the above scenario where you only want the date as it was in that remote date time... you'd have to hack the date by adding the difference from the remote timezone as compared to the local timezone). Pete
________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of paulwelling Sent: Thursday, May 17, 2007 11:26 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Date - Timezone with WS Thank you Peter and Kelly for your responses... Unfotunately, I don't control our client's DB servers or their other apps that use these WSs, so I'm forced to use this dateTime format: 2007-05-15T00:00:00-04:00 Flash/Flex dropping off the TZ infomation that is sent seems to paint me (and everyone else that has dateTime WSs that they don't control) in to a pretty small corner. If I knew the TZ of the dateTime that was sent in the WS then I could ajust accordingly based on my app needs... I still have a feeling that I'm overlooking something since this seems so fundamental..? Any other ideas..? Thanks, Paul --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , "Peter Farland" <[EMAIL PROTECTED]> wrote: > > 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: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> [mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> ] On > Behalf Of paulwelling > Sent: Wednesday, May 16, 2007 6:42 PM > To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> > 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 >