[flexcoders] Re: AMFPHP: Mapping date objects between PHP and Flex

2006-08-23 Thread Stefan Schmalhaus
--- In flexcoders@yahoogroups.com, Nate Hardt [EMAIL PROTECTED] wrote: Probably whoever designed the date class wanted to represent a date down to milliseconds, whereas the unix timestamp only represents a date down to the second. I finally decided to use two date properties on my value

[flexcoders] Re: AMFPHP: Mapping date objects between PHP and Flex

2006-08-23 Thread Stefan Schmalhaus
--- In flexcoders@yahoogroups.com, Oriol Gual [EMAIL PROTECTED] wrote: I had already posted a solution some posts ago, but this will be the solution to you: LOL... Sorry, I read your post but I didn't realize that I could apply your solution to my Cairngorm VOs. Yes, it works. Thank you!

[flexcoders] Re: AMFPHP: Mapping date objects between PHP and Flex

2006-08-22 Thread Nate Hardt
Probably whoever designed the date class wanted to represent a date down to milliseconds, whereas the unix timestamp only represents a date down to the second. On Aug 21, 2006, at 2:53 PM, Renaun Erickson wrote: Ask the people that created Flash (the Date class), maybe they have a good

[flexcoders] Re: AMFPHP: Mapping date objects between PHP and Flex

2006-08-21 Thread Stefan Schmalhaus
--- In flexcoders@yahoogroups.com, Marcelo de Moraes Serpa [EMAIL PROTECTED] 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

Re: [flexcoders] Re: AMFPHP: Mapping date objects between PHP and Flex

2006-08-21 Thread Marcelo de Moraes Serpa
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

Re: [flexcoders] Re: AMFPHP: Mapping date objects between PHP and Flex

2006-08-21 Thread Oriol Gual
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

[flexcoders] Re: AMFPHP: Mapping date objects between PHP and Flex

2006-08-21 Thread Renaun Erickson
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

Re: [flexcoders] Re: AMFPHP: Mapping date objects between PHP and Flex

2006-08-21 Thread Oriol Gual
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.Theissue at hand is a limitation of PHP.You have to handle the manualconversion your self and your method below is a perfect fit. As far as the

Re: [flexcoders] Re: AMFPHP: Mapping date objects between PHP and Flex

2006-08-21 Thread Marcelo de Moraes Serpa
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

[flexcoders] Re: AMFPHP: Mapping date objects between PHP and Flex

2006-08-21 Thread Renaun Erickson
Ask the people that created Flash (the Date class), maybe they have a good reason for it. Renaun --- In flexcoders@yahoogroups.com, Marcelo de Moraes Serpa [EMAIL PROTECTED] wrote: And why dates are multiplied by 1000? That´s a good question :) Marcelo. On 8/21/06, Oriol Gual [EMAIL