The problem is that .NET returns the dateTime without timezone information, i.e. the value "1977-06-12T00:00:00" is missing the suffix for timezone data. If it returned "1977-06-12T00:00:00Z" or some other timezone info it would work fine. In XSD the absence of a timezone means the date/time is technically indeterminate by a significant range (+/- 14 hours for various DST worst cases I presume). Flex 2.0 interprets an XSD dateTime as an ActionScript Date in all cases - but without any timezone information it currently uses UTC to construct the date. We have a bug that asks us to consider a change to this behavior to assume the local client timezone when creating the date, but both of these solutions are technically arbitrary.
 
Irrespective of Flex, ActionScript Dates are always displayed in the local timezone no matter what... there are various UTC helper methods to get information back in the UTC timezone.
 
Your manual correction probably isn't working because you would have to take into account that the timezone-less dateTime has been interpreted in the UTC timezone but then on the default display of the Date it's in your local timezone. If you can't get .NET to include timezone information then for now I suggest sending a String back instead to avoid this complication.

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of kellyb723
Sent: Friday, June 16, 2006 12:32 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Dates WebServices .NET (redux)

I read an old thread on this but there did not seem to be any
resolution.

Has someone found a way to turn off the automatic inaccurate
conversion to local time that Flex 2.0 does to dates it receives from
.NET Web Services?

The date line in my WSDL is as follows:
<s:element minOccurs="1" maxOccurs="1" name="BirthDate"
nillable="true" type="s:dateTime"/>

If the web service sends "1977-06-12T00:00:00" in the response Flex
receives it and creates a Date property to the object but converts it
for the machines local timezone. Worse yet, even if i manually
compensate for this in AS3 code it get coverted the other way when
going back in the to the server for the Save service.

This problem has me pulling my hair out. My app does all timezone
management interally, adn mostly just doesn't care. I just want this
turned off.

Can anyone Help?

- Kelly

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to