ID:               35887
 Updated by:       [EMAIL PROTECTED]
 Reported By:      mattsch at gmail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         WDDX related
 Operating System: Gentoo
 PHP Version:      5.1.1
 New Comment:

2006-1-6T0:0:0-8:0 is not a valid wddx format (which follows ISO8601,
http://www.cl.cam.ac.uk/~mgk25/iso-time.html)


Previous Comments:
------------------------------------------------------------------------

[2006-01-03 23:12:21] mattsch at gmail dot com

On php 5.0.4 this script outputs: 1136534400
On php 5.1.1 this script outputs: 2006-1-6T0:0:0-8:0

<?php
$eventsXML = "<wddxPacket version='1.0'><header/><data><recordset
rowCount='1' fieldNames='eventDate'
type='coldfusion.sql.QueryTable'><field
name='eventDate'><dateTime>2006-1-6T0:0:0-8:0</dateTime></field></recordset></data></wddxPacket>";
$eventsXML = wddx_deserialize($eventsXML);
echo $eventsXML['eventDate'][0];
?>

------------------------------------------------------------------------

[2006-01-03 21:31:37] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.

Without external files please...

------------------------------------------------------------------------

[2006-01-03 21:27:59] mattsch at gmail dot com

Description:
------------
wddx_deserialize does not parse the dateTime like it did in php 5.0.4. 
5.0.4 parsed the dateTime into a unix timestamp.  5.1.1 does not convert
it and keeps it as this format: 2006-1-6T0:0:0-8:0

Reproduce code:
---------------
$eventsXML = wddx_deserialize(file_get_contents($eventsXMLFile));
echo $eventsXML['eventDate'][$i];

Expected result:
----------------
Output a unix time stamp like php 5.0.4.

5.0.4 format: 1136534400
5.1.1 format: 2006-1-6T0:0:0-8:0


Actual result:
--------------
Outputs incorrect format for datetimes: 2006-1-6T0:0:0-8:0


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=35887&edit=1

Reply via email to