views:

50

answers:

1

I am working on an application that is near the end of its development cycle and has mostly passed user testing. We recently realized that having flex convert dates to the client's local timezone is not desired, as all of our dates are in EST and contain no time data. Since BlazeDS sends dates in UTC, this results in the dates being converted to the day before in timezones west of EST.

The best solution is to go in and refactor all dates to adjust for the timezone offset, but that is just not doable at this stage. Since all dates in our application don't care about time, I would really like to be able to intercept all Date objects that come across BlazeDS and adjust for the timezone offset. Is it possible to do this? If not, are there any "cross cutting" solutions?

Thanks

+1  A: 

You might want to take a look at http://help.adobe.com/en_US/FlashPlatform//reference/actionscript/3/mx/rpc/remoting/RemoteObject.html#convertResultHandler

You can inspect all the results from a RO call before they get passed to handlers.

I'm not sure that its a better way... as you'll be inspecting every message that comes back!

Gregor Kiddie
Thanks for your answer. We decided to do something similar, but farther down the stack. We're going to default the time on all Dates that are pulled out of the database to be noon, to allow enough buffer for Flex to as it pleases. It's not ideal, but should work fine. Also, it's definitely good to have your answer in my back pocket to save the day another time. Thanks!
Jeremy