Jeremy
Jeremy

Reputation: 22415

Intercepting Date objects coming from BlazeDS and adjusting for timezone differences

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

Upvotes: 3

Views: 1500

Answers (1)

Gregor Kiddie
Gregor Kiddie

Reputation: 3119

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!

Upvotes: 1

Related Questions