AMFDateConverter – Convert PHP AMF to Flex Date Class

One of the frustrating things about AMF is that there is no mapping to the Flex Date class from PHP. Unlike converting to an ArrayCollection which utilizes the flex.messaging.io.ArrayCollection class in PHP to automatically map everything for you, there appears to be no support for Date serialization.  So, a few months back, I figured out a relatively easy way to do the conversion on the Flex end without much trouble.  This method involves receiving either UTC Date timestamps (MM/DD/YYYY LL:NN:SS A“), or UNIX timestamps (# of millis since 1970) and converting them to a Date in the setter function for your property. Continue reading AMFDateConverter – Convert PHP AMF to Flex Date Class