Chrome Flash Player (Pepper) Date Time Zone Office Error

It was hard for me to find anything on this important issue, so I decided to post it to help users work on the same issue.

In Chrome, the built-in Flash Player (Pepper) has an error regarding the Offset date time range, which leads to some unpredictable behavior when your application deals with dates. Since we provide the commercial component of the Flex calendar (KC-Calendar), this problem is crucial for our customers and their applications.

Details about the problems can be found here: http://code.google.com/p/chromium/issues/detail?id=154060 (please vote)

Waiting for a fix, if anyone has a workaround, this can be very helpful. Thanks in advance!

+4
source share
1 answer

We have addressed such problems before and, frankly, instead of playing with trying to serialize Dates - IMO, the best solution (if you don't want to automatically change the time zone) is to simply pass date data types as strings. We do this using Java and ActionScript getters / seters, which (correctly) set serialized "date" objects in our DTO by parsing uncorrected date strings.

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

The only minor caveat, obviously, is that you need to ensure that the Flex and String-to-Date / Date-To-String server functions use the same date format. Just add a good comment explaining this (so no one pinches it) next to your date / format parsers, and you're fine.

I expect this problem to probably disappear after the release of the HTML5-based Flex compiler (this is really just a Flash function that is not the desired behavior in our cases).

+1
source

Source: https://habr.com/ru/post/1439127/


All Articles