[phpxmlrpc] DateTime in a Struct

Phillip Fox phill at phillfox.net
Thu Jan 23 15:32:26 GMT 2003


Hi there, I'm getting back into a personal project of mine that will use 
  a XML-RPC server and I've hit a road block. Im using PHP 4.3.0 as an 
Apache module on Windows 2000 with xmlrpc.inc version 1.20.

I've used an example server included with the .inc with Methods that 
call PHP functions, which return arrays that are converted to the proper 
XML entities.

I'm having a problem creating a ISO8601 DateTime value. What I need is:

<member>
	<name>DateCreated</name>
	<value>
		<dateTime.iso8601>20030121T09:22:16</dateTime.iso8601>
	</value>
</member>

What is get is:

<member>
	<name>DateCreated</name>
	<value>
		<string>20030121T09:22:16</string>
	</value>
</member>

The PHP is simple:
	$returnArray['dateCreated'] = $addedDate

I've also tried
	$returnArray['dateCreated'] = new xmlrpcval($dateAdded, 'dateTime');

That doesn't work either.

I've run out of ideas but suspet that the solution is a simple one - any 
suggestions?

Thanks in advance.

Phillip Fox





More information about the phpxmlrpc mailing list