Re: [SOAP] SOAP dateTime conversion class problem
| From: | Shane Caraveo | Date: | Sun, 18 May 2003 01:22:41 +0000 |
| Subject: | Re: [SOAP] SOAP dateTime conversion class problem | ||
| References: | 1 | Groups: | php.soap |
| Request: | Send a blank email to php-soap+get-596@lists.php.net to get a copy of this message | ||
Hi Mike,
If I do this:
$time = new SOAP_Type_dateTime("2003-05-14T00:00:00.0000000+01:00");
print $time->toUTC()."\n";
print_r($time);
print date("d/m/Y", $time->timestamp);
I get the output:
2003-05-14T23:00:00Z
soap_type_datetime Object
(
[ereg_iso8601] => ...
[timestamp] => 1052953200
)
14/05/2003
Also you can do $this->_test("2003-05-14T00:00:00.0000000+01:00");
It seems correct to me. Are you saying you get 15/05/2003? That would be very odd.
Shane
Mike Carter wrote:
Hi,
I seem to be having a few problems with the SOAP dateTime class.
I pass in the XML time string "2003-05-14T00:00:00.0000000+01:00"
$time = new SOAP_Type_dateTime($entry->EventDate);
The Unix timestamp returned is:-
soap_type_datetime Object
(
[ereg_iso8601] => (-?[0-9]{4})-([0-9]{2})-([0-9]{2}).....blah
[timestamp] => 1052953200
)
Doing date("d/m/Y", $time->timestamp) doesn't display the correct date, it's
a day in advance of the original 14/05/2003 !
Any idea what could be going on here?
Regards,
Mike C.