Skip to content

Commit

Permalink
MFH: Fixed bug #13142 (strtotime not handling "M d H:i:s Y" format)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilia Alshanetsky committed Jul 28, 2003
1 parent a6901dc commit fc8b10c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions NEWS
Expand Up @@ -61,6 +61,7 @@ PHP 4 NEWS
- Fixed bug #21855 (Threading issue on HP-UX). (Roshan Naik, Andi, Moriyoshi)
- Fixed bug #21074 (Apache2: "ErrorDocument xxx /error.php" broken). (Jani)
- Fixed bug #19613 (putenv("VAR=") does not empty VAR on win32). (Zeev)
- Fixed bug #13142 (strtotime not handling "M d H:i:s Y" format). (Ilia)
- Fixed bug #11924 (ibase_query(), ibase_execute() mangled passed parameters).
(Jani)

Expand Down
11 changes: 11 additions & 0 deletions ext/standard/parsedate.y
Expand Up @@ -260,6 +260,17 @@ date : tUNUMBER '/' tUNUMBER {
((struct date_yy *)parm)->yyMonth = $1;
((struct date_yy *)parm)->yyDay = $3;
}
| tMONTH tUNUMBER tUNUMBER ':' tUNUMBER ':' tUNUMBER tUNUMBER {
((struct date_yy *)parm)->yyYear = $8;
((struct date_yy *)parm)->yyMonth = $1;
((struct date_yy *)parm)->yyDay = $2;

((struct date_yy *)parm)->yyHour = $3;
((struct date_yy *)parm)->yyMinutes = $5;
((struct date_yy *)parm)->yySeconds = $7;

((struct date_yy *)parm)->yyHaveTime = 1;
}
| tUNUMBER '/' tUNUMBER '/' tUNUMBER {
/* Interpret as YYYY/MM/DD if $1 >= 1000, otherwise as MM/DD/YY.
The goal in recognizing YYYY/MM/DD is solely to support legacy
Expand Down

0 comments on commit fc8b10c

Please sign in to comment.