Why don't you just use the result of time() (seconds since jan 1st 1970) and do the date translation at the other end...
-----Original Message----- From: Stephan Stapel [mailto:[EMAIL PROTECTED] Sent: Wednesday, 26 December 2007 5:22 AM To: [email protected] Subject: [fw-general] Json date type encoding/ decoding Hi! I'm working on scripts to to synchonize a website against a backend system. I'm planning to use json to transfer data back and forth between the systems which works rather well because of the small footprint (in comparison to xml). However, today I ran into a problem around date representation. Doing a little google search, I discovered that there are misc attempts to represent date/ datetime types in json, e.g. @1198627200000@ and new Date(1198627200000) there seems to be no standard yet, however, the second variant looks quite common. Did anyone of you also have this problem and how did you solve it? Basically, it'd imho be cool to convert such a value into a Zend_Date type. What do you think? Would a patch of Zend_Json_Decoder::_decodeValue() have a chance to be included into the framework? Or would you rather wait until the date representation is standardized? cheers, Stephan
