- Fixed bug #40290 (strtotime() returns unexpected result with particular

timezone offset).
This commit is contained in:
Derick Rethans 2007-04-13 08:11:07 +00:00
parent e7d68b8373
commit d62dca3d48
3 changed files with 11 additions and 7 deletions

2
NEWS
View File

@ -8,6 +8,8 @@ PHP NEWS
(Ilia)
- Fixed bug #40861 (strtotime() doesn't handle double negative relative time
units correctly). (Derick)
- Fixed bug #40290 (strtotime() returns unexpected result with particular
timezone offset). (Derick)
10 Apr 2007, PHP 5.2.2RC1

View File

@ -1,4 +1,4 @@
/* Generated by re2c 0.11.0 on Wed Apr 11 16:31:33 2007 */
/* Generated by re2c 0.11.0 on Fri Apr 13 10:06:46 2007 */
#line 1 "ext/date/lib/parse_date.re"
/*
+----------------------------------------------------------------------+
@ -21774,7 +21774,8 @@ timelib_time* timelib_strtotime(char *s, int len, struct timelib_error_container
} 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 @@ timelib_time* timelib_strtotime(char *s, int len, struct timelib_error_container
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 @@ void timelib_fill_holes(timelib_time *parsed, timelib_time *now, int options)
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) {

View File

@ -1543,7 +1543,8 @@ timelib_time* timelib_strtotime(char *s, int len, struct timelib_error_container
} 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 @@ timelib_time* timelib_strtotime(char *s, int len, struct timelib_error_container
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 @@ void timelib_fill_holes(timelib_time *parsed, timelib_time *now, int options)
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) {