Browse Source

- Fixed bug #33578 (strtotime() doesn't understand "11 Oct" format). (Derick)

PHP-5.1
Derick Rethans 21 years ago
parent
commit
aa5084d17b
  1. 1
      NEWS
  2. 5041
      ext/date/lib/parse_date.c
  3. 11
      ext/date/lib/parse_date.re
  4. 11
      ext/date/lib/resource/parse_date.re

1
NEWS

@ -9,6 +9,7 @@ PHP NEWS
- Fixed memory corruption in pg_copy_from() in case the as_null parameter was
passed. (Derick)
- Fixed crash inside stream_get_line() when length parameter equals 0. (Ilia)
- Fixed bug #33578 (strtotime() doesn't understand "11 Oct" format). (Derick)
- Fixed bug #33562 (date("") crashes). (Derick)
- Fixed bug #33536 (strtotime() defaults to now even on non time string).
(Derick)

5041
ext/date/lib/parse_date.c
File diff suppressed because it is too large
View File

11
ext/date/lib/parse_date.re

@ -845,6 +845,7 @@ datenoday = monthtext ([ -.])* year4;
datenodayrev = year4 ([ -.])* monthtext;
datetextual = monthtext ([ -.])+ day [,.stndrh ]* year;
datenoyear = monthtext ([ -.])+ day [,.stndrh ]*;
datenoyearrev = day ([ -.])+ monthtext;
datenocolon = year4 monthlz daylz;
/* Special formats */
@ -1149,6 +1150,16 @@ relativetext = (reltextnumber space reltextunit)+;
return TIMELIB_DATE_TEXT;
}
datenoyearrev
{
TIMELIB_INIT;
TIMELIB_HAVE_DATE();
s->time->d = timelib_get_nr((char **) &ptr, 2);
s->time->m = timelib_get_month((char **) &ptr);
TIMELIB_DEINIT;
return TIMELIB_DATE_TEXT;
}
datenocolon
{
TIMELIB_INIT;

11
ext/date/lib/resource/parse_date.re

@ -845,6 +845,7 @@ datenoday = monthtext ([ -.])* year4;
datenodayrev = year4 ([ -.])* monthtext;
datetextual = monthtext ([ -.])+ day [,.stndrh ]* year;
datenoyear = monthtext ([ -.])+ day [,.stndrh ]*;
datenoyearrev = day ([ -.])+ monthtext;
datenocolon = year4 monthlz daylz;
/* Special formats */
@ -1149,6 +1150,16 @@ relativetext = (reltextnumber space reltextunit)+;
return TIMELIB_DATE_TEXT;
}
datenoyearrev
{
TIMELIB_INIT;
TIMELIB_HAVE_DATE();
s->time->d = timelib_get_nr((char **) &ptr, 2);
s->time->m = timelib_get_month((char **) &ptr);
TIMELIB_DEINIT;
return TIMELIB_DATE_TEXT;
}
datenocolon
{
TIMELIB_INIT;

Loading…
Cancel
Save