Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.14.0

Bug #10206 Timezone in Type/dateTime.php not converted correctly
Submitted: 2007-02-27 13:01 UTC
From: jan dot ehrlich at uni-passau dot de Assigned: cweiske
Status: Closed Package: SOAP (version 0.10.1)
PHP Version: 4.4.4 OS: Windows
Roadmaps: (Not assigned)    
Subscription  


 [2007-02-27 13:01 UTC] jan dot ehrlich at uni-passau dot de (Jan Ehrlich)
Description: ------------ On line 97 in the function toString the timezone is converted with the default PHP convert string O . This is false. The PHP use for timezone the pattern +0200 , but the XSD defines the pattern +02:00 (see http://www.w3.org/TR/xmlschema-2/#dateTime-timezones). The source code should be modified to be XSD compatible. Test script: --------------- You should add following function: /** * Converts PHP timezone String to XSD compatible timezone String. * see http://www.w3.org/TR/xmlschema-2/#dateTime-timezones * @param string $timeZoneStr a PHP timezone string * @return string An XSD compatible timezone string */ function timeZoneToXSD($timeZoneStr) { if(strlen($timeZoneStr)!=5) { return $timeZoneStr; } return substr($timeZoneStr,0,3) . ":" . substr($timeZoneStr,3,2); } and substitute the line 97 with following: return date('Y-m-d\TH:i:s', $timestamp) . $this->timeZoneToXSD(date('O', $timestamp)) ;

Comments

 [2007-06-27 15:55 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!