Re: Date conversion error?
"Sean C. Sullivan" <[email protected]>
| Newsgroups | gmane.comp.java.openamf.user |
|---|---|
| Message-ID | <[email protected]> |
org.openamf.io.AMFSerializer is responsible for storing the Date object
into the AMF message
AMFSerializer's writeData(Object) method is whee the work is done.
Here's how OpenAMF processes java.util.Date objects:
else if (value instanceof Date) {
// write Date object
outputStream.writeByte(AMFBody.DATA_TYPE_DATE);
outputStream.writeDouble(((Date) value).getTime());
int offset = TimeZone.getDefault().getRawOffset();
outputStream.writeShort(offset / MILLS_PER_HOUR);
}
I'll try to reproduce thte bug on my local PC.
-Sean
Cristiano Monteiro dos Santos wrote:
>Hi there guys!
>
>I'm having a problem dealing with Date objects from Java to Flash. I have an EJB method that only returns a new Date() object. But every time I call that method, the received Date in Flash gets an hour less.
>
>Anyone else is getting this error?
>
>Thanks!
>Cris
>
>
>
>
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/