Chrome Flash Player (Pepper) date timezoneOffset bug Chrome Flash Player (Pepper) date timezoneOffset bug google-chrome google-chrome

Chrome Flash Player (Pepper) date timezoneOffset bug


We've dealt with such issues before, and honestly--rather than playing around with trying to serialize Dates--IMO the best solution (unless you WANT auto timezone conversion) is to simply pass date data types as strings. We do this cleanly using Java and ActionScript getters/setters which (correctly) set the serialized "date" objects in our DTO by parsing the un-adjusted date strings.

Ex. when you set a Date object's value, in the setter you convert Date to String & set a String field for that date. In the getter you get the String value for that date and parse it, returning a new Date object. Do this on server and client side.

The only minor caveat, obviously, is that you need to ensure the Flex & server side String-to-Date/Date-To-String functions use the same date format. Just put a nice comment explaining this (so nobody screws with it) next to your serialization date parsers/formatters and you're fine.

I expect this issue will probably go away once an HTML5-based Flex compiler is released (it's really just a Flash feature which isn't the desired behavior in our cases).