Re: problem with SOAP's date/time type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



1 hour off sounds like a Timezone/Daylight Savings problem to me. Check to see that your server's timezone is set correctly, and also check to see if there is some daylight savings conversion function somewhere that might be causing this.

Javier Muniz wrote:

Hmmm, I'm actually having problems going in the other direction.  I have a
unix timestamp that I'm getting via PEAR::Date's getTime function, and
putting that into a dateTime type like so:

$soap_date = new SOAP_Type_dateTime($date->getTime())

Then I return it as a dateTime in my SOAP method via:

return new SOAP_Value('time','dateTime',$soap_date->toString())

And the resulting timestamp is always one hour ahead of the actual time.
Now at first I thought this problem had to do with SOAP's dateTime type, but
then I discovered that doing the same thing with the Date object like:

$test_date = new Date($date->getTime())

Also yielded the same result.  Now I'm wondering it if it's a problem with
getTime().  I'm going to do a little desk check today and see if I can get
to the bottom of it.

-Javier

-----Original Message-----
From: Mike Carter [mailto:mikeatwork@ukonline.co.uk] Sent: Friday, October 03, 2003 2:09 AM
To: 'Javier Muniz'; soap@lists.php.net
Subject: RE: problem with SOAP's date/time type






-----Original Message-----
From: Javier Muniz [mailto:jmuniz@granicus.com]

It looks like the dateTime type in the SOAP library might be
reporting times an hour ahead of the actual time. Can someone else verify this? Want to make sure it's not something wrong with my install/setup.


Yes I've struggled with this for half a year... And nobody really said
anything when I posted about it here :-(

However, I've kinda got it sorted now (I think).  It all depends on how you
go about using the class to convert from UTC->timestamp.

This works:-

$dateTimeObj = new SOAP_Type_dateTime; $_SESSION['auth']['ldate'] =
$dateTimeObj->toUnixtime($User->LastLoginDateTime);

Regards,


Mike c



________________________________________________________________________ This email has been scanned for all viruses by the MessageLabs Email Security System. For more information on a proactive email security service working around the clock, around the globe, visit http://www.messagelabs.com ________________________________________________________________________


-- PHP Soap Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux