((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
--- /dev/null
+--TEST--
+Bug #13142 strtotime handling of "M d H:i:s Y" format
+--SKIPIF--
+<?php
+if (!@putenv("TZ=US/Eastern") || getenv("TZ") != 'US/Eastern') {
+ die("skip unable to change TZ enviroment variable\n");
+}
+?>
+--FILE--
+<?php
+echo date("r\n", strtotime("Sep 04 16:39:45 2001"));
+echo date("r\n", strtotime("Sep 04 2001 16:39:45"));
+?>
+--EXPECT--
+Tue, 4 Sep 2001 16:39:45 -0400
+Tue, 4 Sep 2001 16:39:45 -0400