RE: [SOAP] SOAP dateTime conversion class problem
| From: | Mike Carter | Date: | Mon, 19 May 2003 12:00:01 +0000 |
| Subject: | RE: [SOAP] SOAP dateTime conversion class problem | ||
| Groups: | php.soap | ||
| Request: | Send a blank email to php-soap+get-604@lists.php.net to get a copy of this message | ||
Hi,
Executing your code here on the Windows based PHP server..
2003-05-15T23:00:00Z
soap_type_datetime Object
(
[ereg_iso8601] =>
(-?[0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(\.[0-9]*
)?(Z|[+\-][0-9]{4}|[+\-][0-9]{2}:[0-9]{2})?
[timestamp] => 1052953200
)
15/05/2003
Looks like it is adding nearly 2 days to the UTC returned from the SOAP
server? Is this some screw up related to daylight savings time / British
summer time ? -- and if so, why does it add 2 days rather than an hour?
Any thoughts? :-/
Regards,
Mike C.
> -----Original Message-----
> From: Shane Caraveo [mailto:shane@caraveo.com]
> Sent: 18 May 2003 02:23
> To: Mike Carter
> Cc: soap@lists.php.net
> Subject: Re: [SOAP] SOAP dateTime conversion class problem
>
>
> 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.
> >
>
>
>
> ______________________________________________________________
> __________
> This e-mail has been scanned for all viruses by Star
> Internet. The service is powered by MessageLabs. For more
> information on a proactive anti-virus service working around
> the clock, around the globe, visit: http://www.star.net.uk
> ______________________________________________________________
> __________
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.480 / Virus Database: 276 - Release Date: 5/12/2003
>
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.480 / Virus Database: 276 - Release Date: 5/12/2003
________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________