derick          Fri Apr 13 08:11:35 2007 UTC

  Modified files:              
    /php-src/ext/date/lib       parse_date.c parse_date.re 
  Log:
  - MFB: Fixed bug #40290 (strtotime() returns unexpected result with particular
    timezone offset).
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_date.c?r1=1.72&r2=1.73&diff_format=u
Index: php-src/ext/date/lib/parse_date.c
diff -u php-src/ext/date/lib/parse_date.c:1.72 
php-src/ext/date/lib/parse_date.c:1.73
--- php-src/ext/date/lib/parse_date.c:1.72      Wed Apr 11 14:36:44 2007
+++ php-src/ext/date/lib/parse_date.c   Fri Apr 13 08:11:35 2007
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.11.0 on Wed Apr 11 16:36:16 2007 */
+/* Generated by re2c 0.11.0 on Fri Apr 13 10:06:30 2007 */
 #line 1 "ext/date/lib/parse_date.re"
 /*
    +----------------------------------------------------------------------+
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: parse_date.c,v 1.72 2007/04/11 14:36:44 derick Exp $ */
+/* $Id: parse_date.c,v 1.73 2007/04/13 08:11:35 derick Exp $ */
 
 #include "timelib.h"
 
@@ -21774,7 +21774,8 @@
                } else {
                        timelib_error_container_dtor(in.errors);
                }
-               in.time->y = in.time->d = in.time->m = in.time->h = in.time->i 
= in.time->s = in.time->f = in.time->z = in.time->dst = -1;
+               in.time->y = in.time->d = in.time->m = in.time->h = in.time->i 
= in.time->s = in.time->f = in.time->dst = -1;
+               in.time->z = -999999;
                in.time->is_localtime = in.time->zone_type = 0;
                return in.time;
        }
@@ -21793,7 +21794,7 @@
        in.time->i = -1;
        in.time->s = -1;
        in.time->f = -1;
-       in.time->z = -1;
+       in.time->z = -999999;
        in.time->dst = -1;
        in.tzdb = tzdb;
        in.time->is_localtime = 0;
@@ -21830,7 +21831,7 @@
        if (parsed->i == -1) parsed->i = now->i != -1 ? now->i : 0;
        if (parsed->s == -1) parsed->s = now->s != -1 ? now->s : 0;
        if (parsed->f == -1) parsed->f = now->f != -1 ? now->f : 0;
-       if (parsed->z == -1) parsed->z = now->z != -1 ? now->z : 0;
+       if (parsed->z == -999999) parsed->z = now->z != -999999 ? now->z : 0;
        if (parsed->dst == -1) parsed->dst = now->dst != -1 ? now->dst : 0;
 
        if (!parsed->tz_abbr) {
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_date.re?r1=1.63&r2=1.64&diff_format=u
Index: php-src/ext/date/lib/parse_date.re
diff -u php-src/ext/date/lib/parse_date.re:1.63 
php-src/ext/date/lib/parse_date.re:1.64
--- php-src/ext/date/lib/parse_date.re:1.63     Wed Apr 11 14:36:45 2007
+++ php-src/ext/date/lib/parse_date.re  Fri Apr 13 08:11:35 2007
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: parse_date.re,v 1.63 2007/04/11 14:36:45 derick Exp $ */
+/* $Id: parse_date.re,v 1.64 2007/04/13 08:11:35 derick Exp $ */
 
 #include "timelib.h"
 
@@ -1543,7 +1543,8 @@
                } else {
                        timelib_error_container_dtor(in.errors);
                }
-               in.time->y = in.time->d = in.time->m = in.time->h = in.time->i 
= in.time->s = in.time->f = in.time->z = in.time->dst = -1;
+               in.time->y = in.time->d = in.time->m = in.time->h = in.time->i 
= in.time->s = in.time->f = in.time->dst = -1;
+               in.time->z = -999999;
                in.time->is_localtime = in.time->zone_type = 0;
                return in.time;
        }
@@ -1562,7 +1563,7 @@
        in.time->i = -1;
        in.time->s = -1;
        in.time->f = -1;
-       in.time->z = -1;
+       in.time->z = -999999;
        in.time->dst = -1;
        in.tzdb = tzdb;
        in.time->is_localtime = 0;
@@ -1599,7 +1600,7 @@
        if (parsed->i == -1) parsed->i = now->i != -1 ? now->i : 0;
        if (parsed->s == -1) parsed->s = now->s != -1 ? now->s : 0;
        if (parsed->f == -1) parsed->f = now->f != -1 ? now->f : 0;
-       if (parsed->z == -1) parsed->z = now->z != -1 ? now->z : 0;
+       if (parsed->z == -999999) parsed->z = now->z != -999999 ? now->z : 0;
        if (parsed->dst == -1) parsed->dst = now->dst != -1 ? now->dst : 0;
 
        if (!parsed->tz_abbr) {

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

Reply via email to