Fwd: [BULK] [PECL-BUG] Bug #17099 [NEW]: Date read from amf as double not int64
[email protected] (Emanuele Ruffaldi)
| Newsgroups | php.pecl.dev |
|---|---|
| Message-ID | <[email protected]> |
Dear All, Joey Parrish will continue (resume) the workon amfext in conjunction with the recent revival of amfphp Ariel Sommeria. I will try to help him in case of need. Thanks and Best Regards, Emanuele Ruffaldi -------- Original Message -------- Subject: [BULK] [PECL-BUG] Bug #17099 [NEW]: Date read from amf as double not int64 Date: 10 Mar 2010 15:53:54 -0000 From: ssufficool at gmail dot com <[email protected]> To: [email protected] From: ssufficool at gmail dot com Operating system: Ubuntu Linux 9.10 Package version: 0.9.2 PHP version: Irrelevant Package: amfext Bug Type: Bug Bug description: Date read from amf as double not int64 Description: ------------ teh serialized date is read from an AMF stream as a double and then re-ordered as big endian instead of being read as an int64 per the spec. The double is unusable in PHP as a date anyhow. Reproduce code: --------------- $amf = amf_decode($amfstream); echo $amf['date']; Expected result: ---------------- An integer or double value that is usable in PHP Actual result: -------------- 3.123456789E-306 --- SOLUTION? --- For PHP5.x read the int64, convert from milliseconds to seconds and return as ZVAL_LONG with a big fat note of the precision loss. -- Edit bug report at http://pecl.php.net/bugs/bug.php?id=17099&edit=1 --