dmitry          Sat Mar  5 08:26:56 2005 EDT

  Modified files:              (Branch: PHP_5_0)
    /php-src    NEWS 
    /php-src/ext/soap   php_encoding.c 
  Log:
  Fixed bug #32115 (dateTime encoding of timezone incorrect)
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1760.2.271&r2=1.1760.2.272&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1760.2.271 php-src/NEWS:1.1760.2.272
--- php-src/NEWS:1.1760.2.271   Thu Mar  3 05:46:33 2005
+++ php-src/NEWS        Sat Mar  5 08:26:55 2005
@@ -34,6 +34,7 @@
 - Fixed bug #32134 (Overloading offsetGet/offsetSet). (Marcus)
 - Fixed bug #32130 (ArrayIterator::seek() does not throw an Exception on 
   invalid index). (Marcus)
+- Fixed bug #32115 (dateTime encoding of timezone incorrect). (Dmitry)
 - Fixed bug #32081 (in mysqli default socket value is not being used). (Ilia)
 - Fixed bug #32021 (Crash caused by range('', 'z')). (Derick)
 - Fixed bug #32011 (Fragments which replaced Nodes are not globaly useable).
http://cvs.php.net/diff.php/php-src/ext/soap/php_encoding.c?r1=1.71.2.12&r2=1.71.2.13&ty=u
Index: php-src/ext/soap/php_encoding.c
diff -u php-src/ext/soap/php_encoding.c:1.71.2.12 
php-src/ext/soap/php_encoding.c:1.71.2.13
--- php-src/ext/soap/php_encoding.c:1.71.2.12   Tue Dec  7 12:29:24 2004
+++ php-src/ext/soap/php_encoding.c     Sat Mar  5 08:26:56 2005
@@ -17,7 +17,7 @@
   |          Dmitry Stogov <[EMAIL PROTECTED]>                             |
   +----------------------------------------------------------------------+
 */
-/* $Id: php_encoding.c,v 1.71.2.12 2004/12/07 17:29:24 dmitry Exp $ */
+/* $Id: php_encoding.c,v 1.71.2.13 2005/03/05 13:26:56 dmitry Exp $ */
 
 #include <time.h>
 
@@ -2287,7 +2287,7 @@
        int max_reallocs = 5;
        size_t buf_len=64, real_len;
        char *buf;
-       char tzbuf[6];
+       char tzbuf[8];
 
        xmlNodePtr xmlParam;
 
@@ -2309,19 +2309,19 @@
 
                /* Time zone support */
 #ifdef HAVE_TM_GMTOFF
-               sprintf(tzbuf, "%c%02d%02d", (ta->tm_gmtoff < 0) ? '-' : '+', 
abs(ta->tm_gmtoff / 3600), abs( (ta->tm_gmtoff % 3600) / 60 ));
+               sprintf(tzbuf, "%c%02d:%02d", (ta->tm_gmtoff < 0) ? '-' : '+', 
abs(ta->tm_gmtoff / 3600), abs( (ta->tm_gmtoff % 3600) / 60 ));
 #else
 # ifdef __CYGWIN__
-               sprintf(tzbuf, "%c%02d%02d", ((ta->tm_isdst ? _timezone - 
3600:_timezone)>0)?'-':'+', abs((ta->tm_isdst ? _timezone - 3600 : _timezone) / 
3600), abs(((ta->tm_isdst ? _timezone - 3600 : _timezone) % 3600) / 60));
+               sprintf(tzbuf, "%c%02d:%02d", ((ta->tm_isdst ? _timezone - 
3600:_timezone)>0)?'-':'+', abs((ta->tm_isdst ? _timezone - 3600 : _timezone) / 
3600), abs(((ta->tm_isdst ? _timezone - 3600 : _timezone) % 3600) / 60));
 # else
-               sprintf(tzbuf, "%c%02d%02d", ((ta->tm_isdst ? timezone - 
3600:timezone)>0)?'-':'+', abs((ta->tm_isdst ? timezone - 3600 : timezone) / 
3600), abs(((ta->tm_isdst ? timezone - 3600 : timezone) % 3600) / 60));
+               sprintf(tzbuf, "%c%02d:%02d", ((ta->tm_isdst ? timezone - 
3600:timezone)>0)?'-':'+', abs((ta->tm_isdst ? timezone - 3600 : timezone) / 
3600), abs(((ta->tm_isdst ? timezone - 3600 : timezone) % 3600) / 60));
 # endif
 #endif
-               if (strcmp(tzbuf,"+0000") == 0) {
+               if (strcmp(tzbuf,"+00:00") == 0) {
                  strcpy(tzbuf,"Z");
                  real_len++;
                } else {
-                       real_len += 5;
+                       real_len += 6;
                }
                if (real_len >= buf_len) {
                        buf = (char *) erealloc(buf, real_len+1);

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

Reply via email to