>And why dates are multiplied by 1000?

That´s a good question :)

Marcelo.

On 8/21/06, Oriol Gual < [EMAIL PROTECTED]> wrote:

And why dates are multiplied by 1000?

2006/8/21, Renaun Erickson < [EMAIL PROTECTED]>:
Oriol,

My example is a little misleading, I will have to update it.  The
issue at hand is a limitation of PHP.  You have to handle the manual
conversion your self and your method below is a perfect fit.

As far as the 1000 issue it is related to Flash date.

"Flash dates are mapped to Unix timestamps multiplied by 1000; in
addition, no timezone information is available in these dates, which
can cause errors especially if you are using the DateChooser component."

Renaun

--- In flexcoders@yahoogroups.com, "Oriol Gual" <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I had the same problem, I always got a Coercion error, and my
solution was
> to implement the getter and setter for the date var:
>
> private var _date : Date;
>
> public function get date():Date
> {
>       return _date;
> }
> public function set date(value:*):void
> {
>     _date = new Date(value);
> }
>
> I'm also using unix timestamps to send the values, but I've noticed
a weird
> behaivour: Went sending dates to Flex, I have to multiply the
timestampy by
> 1000, and when receiveing from Flex, divide it also by 1000. If not, the
> date is not the same. Anyone knows why?
>
> Oriol.
>
> 2006/8/21, Marcelo de Moraes Serpa <[EMAIL PROTECTED]>:
> >
> > Hmm.. I haven´t ran the login sample app.
> >
> > For dates, I always used unix timestamps and converted the
timestamp to
> > string on the server before returning it to flash. For my purposes
it always
> > worked well as I never had to do any date math on the client side.
> >
> > Take a look at this page:
> > http://www.amfphp.org/docs/datatypes.html
> >
> > and note the DateWrapper class... maybe it could solve your problem?
> >
> > Marcelo.
> >
> > On 8/21/06, Stefan Schmalhaus <[EMAIL PROTECTED]> wrote:
> >
> > >    --- In flexcoders@yahoogroups.com <flexcoders%40yahoog roups.com>,
> > > "Marcelo de Moraes Serpa"
> > >
> > > <celoserpa@> wrote:
> > >
> > > > If you´re using RemoteObjectAMF0, just take a look at the samples
> > > Renaun
> > > > provides.
> > >
> > > Yes, I'm using Renaun's RemoteObjectAMF0. But in the sample he
> > > provides the date mapping doesn't work either. The "published date"
> > > column is empty!
> > >
> > > http://renaun.com/blog/2006/07/26/71/
> > >
> > > Take a look at comment #23!
> > >
> > >
> >
> >
>







Yahoo! Groups Links

<*> To visit your group on the web, go to:
<*> 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/





__._,_.___

--
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