Commit: 40bb9254c59504af21a128355ea6892961291ace
Author: Stanislav Malyshev <s...@php.net> Sun, 30 Sep 2012 20:09:27
-0700
Parents: d3c37f0937dd4445eedb3a5b8b385aaf0b5de24f
b3469560f3886a8b509f9fcc6e64134cab62646c
Branches: PHP-5.4 master
Link:
http://git.php.net/?p=php-src.git;a=commitdiff;h=40bb9254c59504af21a128355ea6892961291ace
Log:
Merge branch 'pull-request/210' into PHP-5.4
* pull-request/210:
Fix bugs 62561,62896 (Modifying DateTime::__construct,date_create adds an
hour) Prevent a unix timestamp, which is always GMT when being parsed, from
taking on the local timezones DST flag.
Changed paths:
MM NEWS
MM ext/date/lib/parse_date.c
diff --cc NEWS
index 86ba860,ca00e47..83c8e23
--- a/NEWS
+++ b/NEWS
@@@ -27,12 -25,8 +27,17 @@@ PH
. Fixed bug #60909 (custom error handler throwing Exception + fatal error
= no shutdown function). (Dmitry)
. Fixed bug #60723 (error_log error time has changed to UTC ignoring default
- timezo). (Laruence)
+ timezone). (Laruence)
+
+- cURL:
+ . Fixed bug #62085 (file_get_contents a remote file by Curl wrapper will
+ cause cpu Soaring). (Pierrick)
+
++- Date:
++ . Fixed bug #62896 ("DateTime->modify('+0 days')" modifies DateTime object)
++ (Lonny Kapelushnik)
++ . Fixed bug #62561 (DateTime add 'P1D' adds 25 hours). (Lonny Kapelushnik)
+
- DOM:
. Fixed bug #63015 (Incorrect arginfo for DOMErrorHandler). (Rob)
diff --cc ext/date/lib/parse_date.c
index 964f10d,964f10d..4829da6
--- a/ext/date/lib/parse_date.c
+++ b/ext/date/lib/parse_date.c
@@@ -1,4 -1,4 +1,4 @@@
--/* Generated by re2c 0.13.5 on Mon Dec 5 22:02:27 2011 */
++/* Generated by re2c 0.13.5 on Sun Sep 30 20:14:42 2012 */
#line 1 "ext/date/lib/parse_date.re"
/*
+----------------------------------------------------------------------+
@@@ -995,7 -995,7 +995,7 @@@ std
}
yy2:
YYDEBUG(2, *YYCURSOR);
--#line 1082 "ext/date/lib/parse_date.re"
++#line 1083 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("firstdayof | lastdayof");
TIMELIB_INIT;
@@@ -1034,7 -1034,7 +1034,7 @@@ yy3
}
yy4:
YYDEBUG(4, *YYCURSOR);
--#line 1676 "ext/date/lib/parse_date.re"
++#line 1677 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("tzcorrection | tz");
@@@ -1358,7 -1358,7 +1358,7 @@@ yy12
if (yych <= '9') goto yy1385;
yy13:
YYDEBUG(13, *YYCURSOR);
--#line 1771 "ext/date/lib/parse_date.re"
++#line 1772 "ext/date/lib/parse_date.re"
{
add_error(s, "Unexpected character");
goto std;
@@@ -2420,7 -2420,7 +2420,7 @@@ yy49
if (yych <= '9') goto yy55;
yy50:
YYDEBUG(50, *YYCURSOR);
--#line 1760 "ext/date/lib/parse_date.re"
++#line 1761 "ext/date/lib/parse_date.re"
{
goto std;
}
@@@ -2433,7 -2433,7 +2433,7 @@@ yy52
YYDEBUG(52, *YYCURSOR);
++YYCURSOR;
YYDEBUG(53, *YYCURSOR);
--#line 1765 "ext/date/lib/parse_date.re"
++#line 1766 "ext/date/lib/parse_date.re"
{
s->pos = cursor; s->line++;
goto std;
@@@ -2825,7 -2825,7 +2825,7 @@@ yy72
if (yych == 's') goto yy74;
yy73:
YYDEBUG(73, *YYCURSOR);
--#line 1744 "ext/date/lib/parse_date.re"
++#line 1745 "ext/date/lib/parse_date.re"
{
timelib_ull i;
DEBUG_OUTPUT("relative");
@@@ -3602,7 -3602,7 +3602,7 @@@ yy166
}
yy167:
YYDEBUG(167, *YYCURSOR);
--#line 1607 "ext/date/lib/parse_date.re"
++#line 1608 "ext/date/lib/parse_date.re"
{
const timelib_relunit* relunit;
DEBUG_OUTPUT("daytext");
@@@ -4139,7 -4139,7 +4139,7 @@@ yy193
}
yy194:
YYDEBUG(194, *YYCURSOR);
--#line 1666 "ext/date/lib/parse_date.re"
++#line 1667 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("monthtext");
TIMELIB_INIT;
@@@ -4199,7 -4199,7 +4199,7 @@@ yy198
}
yy199:
YYDEBUG(199, *YYCURSOR);
--#line 1412 "ext/date/lib/parse_date.re"
++#line 1413 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datetextual | datenoyear");
@@@ -4481,7 -4481,7 +4481,7 @@@ yy222
}
yy223:
YYDEBUG(223, *YYCURSOR);
--#line 1714 "ext/date/lib/parse_date.re"
++#line 1715 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("dateshortwithtimeshort | dateshortwithtimelong |
dateshortwithtimelongtz");
@@@ -5208,7 -5208,7 +5208,7 @@@ yy278
YYDEBUG(278, *YYCURSOR);
++YYCURSOR;
YYDEBUG(279, *YYCURSOR);
--#line 1690 "ext/date/lib/parse_date.re"
++#line 1691 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("dateshortwithtimeshort12 |
dateshortwithtimelong12");
TIMELIB_INIT;
@@@ -5409,7 -5409,7 +5409,7 @@@ yy294
++YYCURSOR;
yy295:
YYDEBUG(295, *YYCURSOR);
--#line 1384 "ext/date/lib/parse_date.re"
++#line 1385 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datenoday");
@@@ -6642,7 -6642,7 +6642,7 @@@ yy362
if (yych <= '9') goto yy365;
yy364:
YYDEBUG(364, *YYCURSOR);
--#line 1528 "ext/date/lib/parse_date.re"
++#line 1529 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pgtextshort");
@@@ -7293,7 -7293,7 +7293,7 @@@ yy392
}
yy393:
YYDEBUG(393, *YYCURSOR);
--#line 1586 "ext/date/lib/parse_date.re"
++#line 1587 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("ago");
TIMELIB_INIT;
@@@ -9063,7 -9063,7 +9063,7 @@@ yy454
++YYCURSOR;
yy455:
YYDEBUG(455, *YYCURSOR);
--#line 1289 "ext/date/lib/parse_date.re"
++#line 1290 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("iso8601date4 | iso8601date2 | iso8601dateslash |
dateslash");
TIMELIB_INIT;
@@@ -9634,7 -9634,7 +9634,7 @@@ yy475
}
yy476:
YYDEBUG(476, *YYCURSOR);
--#line 1426 "ext/date/lib/parse_date.re"
++#line 1427 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("datenoyearrev");
TIMELIB_INIT;
@@@ -9786,7 -9786,7 +9786,7 @@@ yy488
YYDEBUG(488, *YYCURSOR);
++YYCURSOR;
YYDEBUG(489, *YYCURSOR);
--#line 1144 "ext/date/lib/parse_date.re"
++#line 1145 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("timetiny12 | timeshort12 | timelong12");
TIMELIB_INIT;
@@@ -9815,7 -9815,7 +9815,7 @@@ yy490
}
yy491:
YYDEBUG(491, *YYCURSOR);
--#line 1181 "ext/date/lib/parse_date.re"
++#line 1182 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("timeshort24 | timelong24 | iso8601long");
@@@ -10150,7 -10150,7 +10150,7 @@@ yy523
YYDEBUG(523, *YYCURSOR);
++YYCURSOR;
YYDEBUG(524, *YYCURSOR);
--#line 1161 "ext/date/lib/parse_date.re"
++#line 1162 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("mssqltime");
TIMELIB_INIT;
@@@ -10275,7 -10275,7 +10275,7 @@@ yy534
if (yych <= '9') goto yy541;
yy535:
YYDEBUG(535, *YYCURSOR);
--#line 1343 "ext/date/lib/parse_date.re"
++#line 1344 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datefull");
@@@ -11026,7 -11026,7 +11026,7 @@@ yy605
YYDEBUG(606, *YYCURSOR);
++YYCURSOR;
YYDEBUG(607, *YYCURSOR);
--#line 1358 "ext/date/lib/parse_date.re"
++#line 1359 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("pointed date YYYY");
TIMELIB_INIT;
@@@ -11073,7 -11073,7 +11073,7 @@@ yy611
if (yych <= '9') goto yy605;
yy612:
YYDEBUG(612, *YYCURSOR);
--#line 1370 "ext/date/lib/parse_date.re"
++#line 1371 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pointed date YY");
@@@ -11727,7 -11727,7 +11727,7 @@@ yy656
}
yy657:
YYDEBUG(657, *YYCURSOR);
--#line 1329 "ext/date/lib/parse_date.re"
++#line 1330 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("gnudateshort");
@@@ -11846,7 -11846,7 +11846,7 @@@ yy666
}
yy667:
YYDEBUG(667, *YYCURSOR);
--#line 1273 "ext/date/lib/parse_date.re"
++#line 1274 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("americanshort | american");
@@@ -12094,7 -12094,7 +12094,7 @@@ yy700
if (yych <= ':') goto yy704;
yy701:
YYDEBUG(701, *YYCURSOR);
--#line 1556 "ext/date/lib/parse_date.re"
++#line 1557 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("clf");
@@@ -12666,7 -12666,7 +12666,7 @@@ yy763
}
yy764:
YYDEBUG(764, *YYCURSOR);
--#line 1301 "ext/date/lib/parse_date.re"
++#line 1302 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("iso8601date2");
@@@ -12718,7 -12718,7 +12718,7 @@@ yy771
YYDEBUG(771, *YYCURSOR);
++YYCURSOR;
YYDEBUG(772, *YYCURSOR);
--#line 1542 "ext/date/lib/parse_date.re"
++#line 1543 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pgtextreverse");
@@@ -12869,7 -12869,7 +12869,7 @@@ yy783
}
yy784:
YYDEBUG(784, *YYCURSOR);
--#line 1577 "ext/date/lib/parse_date.re"
++#line 1578 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("year4");
TIMELIB_INIT;
@@@ -13028,7 -13028,7 +13028,7 @@@ yy793
}
yy794:
YYDEBUG(794, *YYCURSOR);
--#line 1398 "ext/date/lib/parse_date.re"
++#line 1399 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datenodayrev");
@@@ -13256,7 -13256,7 +13256,7 @@@ yy814
if (yych <= '7') goto yy817;
yy815:
YYDEBUG(815, *YYCURSOR);
--#line 1509 "ext/date/lib/parse_date.re"
++#line 1510 "ext/date/lib/parse_date.re"
{
timelib_sll w, d;
DEBUG_OUTPUT("isoweek");
@@@ -13284,7 -13284,7 +13284,7 @@@ yy817
YYDEBUG(817, *YYCURSOR);
++YYCURSOR;
YYDEBUG(818, *YYCURSOR);
--#line 1490 "ext/date/lib/parse_date.re"
++#line 1491 "ext/date/lib/parse_date.re"
{
timelib_sll w, d;
DEBUG_OUTPUT("isoweekday");
@@@ -13366,7 -13366,7 +13366,7 @@@ yy821
}
yy822:
YYDEBUG(822, *YYCURSOR);
--#line 1476 "ext/date/lib/parse_date.re"
++#line 1477 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pgydotd");
@@@ -13482,7 -13482,7 +13482,7 @@@ yy842
++YYCURSOR;
yy843:
YYDEBUG(843, *YYCURSOR);
--#line 1450 "ext/date/lib/parse_date.re"
++#line 1451 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("xmlrpc | xmlrpcnocolon | soap | wddx | exif");
@@@ -13769,7 -13769,7 +13769,7 @@@ yy848
}
yy849:
YYDEBUG(849, *YYCURSOR);
--#line 1438 "ext/date/lib/parse_date.re"
++#line 1439 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("datenocolon");
TIMELIB_INIT;
@@@ -14700,7 -14700,7 +14700,7 @@@ yy973
if (yych <= '9') goto yy996;
yy974:
YYDEBUG(974, *YYCURSOR);
--#line 1315 "ext/date/lib/parse_date.re"
++#line 1316 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("gnudateshorter");
@@@ -15722,7 -15722,7 +15722,7 @@@ yy1066
}
yy1068:
YYDEBUG(1068, *YYCURSOR);
--#line 1207 "ext/date/lib/parse_date.re"
++#line 1208 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("gnunocolon");
TIMELIB_INIT;
@@@ -15836,7 -15836,7 +15836,7 @@@ yy1075
}
yy1076:
YYDEBUG(1076, *YYCURSOR);
--#line 1253 "ext/date/lib/parse_date.re"
++#line 1254 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("iso8601nocolon");
@@@ -16753,7 -16753,7 +16753,7 @@@ yy1117
}
yy1118:
YYDEBUG(1118, *YYCURSOR);
--#line 1649 "ext/date/lib/parse_date.re"
++#line 1650 "ext/date/lib/parse_date.re"
{
timelib_sll i;
int behavior = 0;
@@@ -16820,7 -16820,7 +16820,7 @@@ yy1126
YYDEBUG(1126, *YYCURSOR);
++YYCURSOR;
YYDEBUG(1127, *YYCURSOR);
--#line 1122 "ext/date/lib/parse_date.re"
++#line 1123 "ext/date/lib/parse_date.re"
{
timelib_sll i;
int behavior = 0;
@@@ -16949,7 -16949,7 +16949,7 @@@ yy1141
}
yy1142:
YYDEBUG(1142, *YYCURSOR);
--#line 1625 "ext/date/lib/parse_date.re"
++#line 1626 "ext/date/lib/parse_date.re"
{
timelib_sll i;
int behavior = 0;
@@@ -19649,7 -19649,7 +19649,7 @@@ yy1294
goto yy1298;
yy1295:
YYDEBUG(1295, *YYCURSOR);
--#line 1099 "ext/date/lib/parse_date.re"
++#line 1100 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("backof | frontof");
TIMELIB_INIT;
@@@ -21382,11 -21382,11 +21382,12 @@@ yy1387
s->time->is_localtime = 1;
s->time->zone_type = TIMELIB_ZONETYPE_OFFSET;
s->time->z = 0;
++ s->time->dst = 0;
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
--#line 21390 "ext/date/lib/parse_date.c"
++#line 21391 "ext/date/lib/parse_date.c"
yy1388:
YYDEBUG(1388, *YYCURSOR);
yych = *++YYCURSOR;
@@@ -21833,7 -21833,7 +21834,7 @@@ yy1417
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
--#line 21837 "ext/date/lib/parse_date.c"
++#line 21838 "ext/date/lib/parse_date.c"
yy1418:
YYDEBUG(1418, *YYCURSOR);
yych = *++YYCURSOR;
@@@ -21877,7 -21877,7 +21878,7 @@@ yy1420
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
--#line 21881 "ext/date/lib/parse_date.c"
++#line 21882 "ext/date/lib/parse_date.c"
yy1421:
YYDEBUG(1421, *YYCURSOR);
yych = *++YYCURSOR;
@@@ -23897,7 -23897,7 +23898,7 @@@ yy1500
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
--#line 23901 "ext/date/lib/parse_date.c"
++#line 23902 "ext/date/lib/parse_date.c"
yy1501:
YYDEBUG(1501, *YYCURSOR);
yych = *++YYCURSOR;
@@@ -24047,7 -24047,7 +24048,7 @@@ yy1508
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
--#line 24051 "ext/date/lib/parse_date.c"
++#line 24052 "ext/date/lib/parse_date.c"
yy1509:
YYDEBUG(1509, *YYCURSOR);
yyaccept = 0;
@@@ -24591,7 -24591,7 +24592,7 @@@ yy1531
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
--#line 24595 "ext/date/lib/parse_date.c"
++#line 24596 "ext/date/lib/parse_date.c"
yy1532:
YYDEBUG(1532, *YYCURSOR);
yyaccept = 0;
@@@ -24764,7 -24764,7 +24765,7 @@@ yy1537
goto yy1531;
}
}
--#line 1775 "ext/date/lib/parse_date.re"
++#line 1776 "ext/date/lib/parse_date.re"
}
@@@ -25070,6 -25070,6 +25071,7 @@@ timelib_time *timelib_parse_from_format
s->time->is_localtime = 1;
s->time->zone_type = TIMELIB_ZONETYPE_OFFSET;
s->time->z = 0;
++ s->time->dst = 0;
break;
case 'e': /* timezone */
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php