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 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 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" <oriol.gual@> 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 <celoserpa@>:
>>>>>
>>>>> 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 <stefan@> wrote:
>>>>>
>>>>>>    --- In flexcoders@yahoogroups.com
> <flexcoders%40yahoogroups.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!
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>> 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
>>>
>>>     http://groups.yahoo.com/group/flexcoders/
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>
>
>
>
>
>
> --
> 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
>
>
>
>
>
>



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