RE: problem with SOAP's date/time type

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

 



I checked all of my timezones and they appear to match, however, the Date
class is calling mktime like so:

mktime(hour,minute,second,month,day,year,0)

This means that is_dst is always 0, regardless of whether or not the time is
daylight savings.  I would imagine that the Date class should use -1, or at
the very least give the option to override the bad choice it's making
currently :)  I'm making the change within my version and I'll try to get
ahold of the PEAR::Date maintainer soon.

-Javier

-----Original Message-----
From: Will Green [mailto:will@hotgazpacho.org] 
Sent: Friday, October 03, 2003 10:09 AM
To: soap@lists.php.net
Subject: Re:  problem with SOAP's date/time type


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

-- 
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