We had the same problems with a Flex 2/.NET 2 application. We where able
to fix it like this:

1) From Flex 2, just pass Date objects (don't convert them, they'll be
send as UTC Dates)
2) in .NET check the incoming DateTime object for it Kind. If it's send
from Flex, it will be UTC
3) in .NET do waht you want with it (i.e. convert it to localtime and
store it in a DB etc.)
4) prior returning any DateTime to Flex, make sure to convert it to UTC

That works pretty nice for us.

Dirk.

> -----Original Message-----
> From: [email protected] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Tim Hoff
> Sent: Friday, June 16, 2006 7:52 PM
> To: [email protected]
> Subject: [flexcoders] Re: Dates WebServices .NET (redux)
> 
> Not sure what to tell you.  I'm returning DateTime values 
> from a .NET web service and not experiencing the same 
> problem.  Perhaps, just cast the returned value to a string 
> VO on the Flex side.
> 
> Good luck,
> -TH
> 
> --- In [email protected], "kellyb723" <[EMAIL PROTECTED]> wrote:
> >
> > That will make it come over as a string but I'm actually returning 
> > classes from my .NET we srvices that are automatically
> serialized.  I
> > dont want to have to deal with strings for dates on the .NET side 
> > where DateTimes actually work properly.
> > 
> > I've also posted a similer thread in the Adobe flex forums, but
> have
> > to received any replies.  Am I to userstand that Flex just insn't 
> > intended to work with Web Services when using actual dates?  Or
> with
> > .NET Web Services in gerneral?
> > 
> > - Kelly
> > 
> > --- In [email protected], "Tim Hoff" <TimHoff@> wrote:
> > >
> > > If you pass the dateTime values back and forth as strings, you
> won't 
> > > experience any local time conversion.  However, you might have
> to 
> > > massage the data a little if you do it this way.
> > > 
> > > -TH
> > > 
> > > --- In [email protected], "kellyb723" <junk0106@> wrote:
> > > >
> > > > 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
> > > >
> > >
> >
> 
> 
> 
> 
> 
> 
> ------------------------ Yahoo! Groups Sponsor 
> --------------------~--> Great things are happening at Yahoo! 
> Groups.  See the new email design.
> http://us.click.yahoo.com/TISQkA/hOaOAA/yQLSAA/nhFolB/TM
> --------------------------------------------------------------
> ------~-> 
> 
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: 
> http://www.mail-archive.com/flexcoders%40yahoogroups.com
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> 
> 
> 


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Groups gets a make over. See the new email design.
http://us.click.yahoo.com/XISQkA/lOaOAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

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

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to