mirror of
https://github.com/php/php-src.git
synced 2025-08-19 08:49:28 +02:00
- Fixed TSRM issue.
- Added guessed timezone to phpinfo() output. - Initialize is_dst in some cases. - Corrected some test cases.
This commit is contained in:
parent
69303b58a4
commit
cef2cd485a
7 changed files with 106 additions and 86 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* Generated by re2c 0.9.8 on Tue Jul 26 18:01:10 2005 */
|
/* Generated by re2c 0.9.8.dev on Tue Aug 9 23:05:03 2005 */
|
||||||
#line 1 "resource/parse_date.re"
|
#line 1 "resource/parse_date.re"
|
||||||
/*
|
/*
|
||||||
+----------------------------------------------------------------------+
|
+----------------------------------------------------------------------+
|
||||||
|
@ -712,6 +712,7 @@ static long timelib_get_zone(char **ptr, int *dst, timelib_time *t, int *tz_not_
|
||||||
t->is_localtime = 1;
|
t->is_localtime = 1;
|
||||||
t->zone_type = TIMELIB_ZONETYPE_OFFSET;
|
t->zone_type = TIMELIB_ZONETYPE_OFFSET;
|
||||||
*tz_not_found = 0;
|
*tz_not_found = 0;
|
||||||
|
t->dst = 0;
|
||||||
|
|
||||||
return -1 * timelib_parse_tz_cor(ptr);
|
return -1 * timelib_parse_tz_cor(ptr);
|
||||||
} else if (**ptr == '-') {
|
} else if (**ptr == '-') {
|
||||||
|
@ -719,6 +720,7 @@ static long timelib_get_zone(char **ptr, int *dst, timelib_time *t, int *tz_not_
|
||||||
t->is_localtime = 1;
|
t->is_localtime = 1;
|
||||||
t->zone_type = TIMELIB_ZONETYPE_OFFSET;
|
t->zone_type = TIMELIB_ZONETYPE_OFFSET;
|
||||||
*tz_not_found = 0;
|
*tz_not_found = 0;
|
||||||
|
t->dst = 0;
|
||||||
|
|
||||||
return timelib_parse_tz_cor(ptr);
|
return timelib_parse_tz_cor(ptr);
|
||||||
} else {
|
} else {
|
||||||
|
@ -771,7 +773,7 @@ static int scan(Scanner *s)
|
||||||
std:
|
std:
|
||||||
s->tok = cursor;
|
s->tok = cursor;
|
||||||
s->len = 0;
|
s->len = 0;
|
||||||
#line 876 "resource/parse_date.re"
|
#line 878 "resource/parse_date.re"
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -810,7 +812,7 @@ std:
|
||||||
0, 0, 0, 0, 0, 0, 0, 0,
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
#line 814 "<stdout>"
|
#line 816 "<stdout>"
|
||||||
{
|
{
|
||||||
YYCTYPE yych;
|
YYCTYPE yych;
|
||||||
unsigned int yyaccept;
|
unsigned int yyaccept;
|
||||||
|
@ -895,7 +897,7 @@ yy2:
|
||||||
yy3:
|
yy3:
|
||||||
YYDEBUG(3, *YYCURSOR);
|
YYDEBUG(3, *YYCURSOR);
|
||||||
|
|
||||||
#line 1340 "resource/parse_date.re"
|
#line 1342 "resource/parse_date.re"
|
||||||
{
|
{
|
||||||
int tz_not_found;
|
int tz_not_found;
|
||||||
TIMELIB_INIT;
|
TIMELIB_INIT;
|
||||||
|
@ -904,7 +906,7 @@ yy3:
|
||||||
TIMELIB_DEINIT;
|
TIMELIB_DEINIT;
|
||||||
return TIMELIB_TIMEZONE;
|
return TIMELIB_TIMEZONE;
|
||||||
}
|
}
|
||||||
#line 901 "<stdout>"
|
#line 903 "<stdout>"
|
||||||
yy4:
|
yy4:
|
||||||
YYDEBUG(4, *YYCURSOR);
|
YYDEBUG(4, *YYCURSOR);
|
||||||
yych = *++YYCURSOR;
|
yych = *++YYCURSOR;
|
||||||
|
@ -990,13 +992,13 @@ yy6:
|
||||||
yy7:
|
yy7:
|
||||||
YYDEBUG(7, *YYCURSOR);
|
YYDEBUG(7, *YYCURSOR);
|
||||||
|
|
||||||
#line 1404 "resource/parse_date.re"
|
#line 1406 "resource/parse_date.re"
|
||||||
{
|
{
|
||||||
/* printf("unexpected character: #%d, %c ", *s->tok, *s->tok); */
|
/* printf("unexpected character: #%d, %c ", *s->tok, *s->tok); */
|
||||||
s->errors++;
|
s->errors++;
|
||||||
goto std;
|
goto std;
|
||||||
}
|
}
|
||||||
#line 984 "<stdout>"
|
#line 986 "<stdout>"
|
||||||
yy8:
|
yy8:
|
||||||
YYDEBUG(8, *YYCURSOR);
|
YYDEBUG(8, *YYCURSOR);
|
||||||
yyaccept = 0;
|
yyaccept = 0;
|
||||||
|
@ -1919,11 +1921,11 @@ yy43:
|
||||||
yy44:
|
yy44:
|
||||||
YYDEBUG(44, *YYCURSOR);
|
YYDEBUG(44, *YYCURSOR);
|
||||||
|
|
||||||
#line 1393 "resource/parse_date.re"
|
#line 1395 "resource/parse_date.re"
|
||||||
{
|
{
|
||||||
goto std;
|
goto std;
|
||||||
}
|
}
|
||||||
#line 1832 "<stdout>"
|
#line 1834 "<stdout>"
|
||||||
yy45:
|
yy45:
|
||||||
YYDEBUG(45, *YYCURSOR);
|
YYDEBUG(45, *YYCURSOR);
|
||||||
++YYCURSOR;
|
++YYCURSOR;
|
||||||
|
@ -1931,12 +1933,12 @@ yy45:
|
||||||
yy46:
|
yy46:
|
||||||
YYDEBUG(46, *YYCURSOR);
|
YYDEBUG(46, *YYCURSOR);
|
||||||
|
|
||||||
#line 1398 "resource/parse_date.re"
|
#line 1400 "resource/parse_date.re"
|
||||||
{
|
{
|
||||||
s->pos = cursor; s->line++;
|
s->pos = cursor; s->line++;
|
||||||
goto std;
|
goto std;
|
||||||
}
|
}
|
||||||
#line 1841 "<stdout>"
|
#line 1843 "<stdout>"
|
||||||
yy47:
|
yy47:
|
||||||
YYDEBUG(47, *YYCURSOR);
|
YYDEBUG(47, *YYCURSOR);
|
||||||
yych = *++YYCURSOR;
|
yych = *++YYCURSOR;
|
||||||
|
@ -2394,7 +2396,7 @@ yy84:
|
||||||
yy85:
|
yy85:
|
||||||
YYDEBUG(85, *YYCURSOR);
|
YYDEBUG(85, *YYCURSOR);
|
||||||
|
|
||||||
#line 1377 "resource/parse_date.re"
|
#line 1379 "resource/parse_date.re"
|
||||||
{
|
{
|
||||||
timelib_ull i;
|
timelib_ull i;
|
||||||
|
|
||||||
|
@ -2409,7 +2411,7 @@ yy85:
|
||||||
TIMELIB_DEINIT;
|
TIMELIB_DEINIT;
|
||||||
return TIMELIB_RELATIVE;
|
return TIMELIB_RELATIVE;
|
||||||
}
|
}
|
||||||
#line 2231 "<stdout>"
|
#line 2233 "<stdout>"
|
||||||
yy86:
|
yy86:
|
||||||
YYDEBUG(86, *YYCURSOR);
|
YYDEBUG(86, *YYCURSOR);
|
||||||
++YYCURSOR;
|
++YYCURSOR;
|
||||||
|
@ -3102,11 +3104,11 @@ yy150:
|
||||||
yy151:
|
yy151:
|
||||||
YYDEBUG(151, *YYCURSOR);
|
YYDEBUG(151, *YYCURSOR);
|
||||||
|
|
||||||
#line 1335 "resource/parse_date.re"
|
#line 1337 "resource/parse_date.re"
|
||||||
{
|
{
|
||||||
goto std;
|
goto std;
|
||||||
}
|
}
|
||||||
#line 2794 "<stdout>"
|
#line 2796 "<stdout>"
|
||||||
yy152:
|
yy152:
|
||||||
YYDEBUG(152, *YYCURSOR);
|
YYDEBUG(152, *YYCURSOR);
|
||||||
yyaccept = 1;
|
yyaccept = 1;
|
||||||
|
@ -3145,7 +3147,7 @@ yy157:
|
||||||
yy158:
|
yy158:
|
||||||
YYDEBUG(158, *YYCURSOR);
|
YYDEBUG(158, *YYCURSOR);
|
||||||
|
|
||||||
#line 1319 "resource/parse_date.re"
|
#line 1321 "resource/parse_date.re"
|
||||||
{
|
{
|
||||||
const timelib_relunit* relunit;
|
const timelib_relunit* relunit;
|
||||||
|
|
||||||
|
@ -3160,7 +3162,7 @@ yy158:
|
||||||
TIMELIB_DEINIT;
|
TIMELIB_DEINIT;
|
||||||
return TIMELIB_RELATIVE;
|
return TIMELIB_RELATIVE;
|
||||||
}
|
}
|
||||||
#line 2834 "<stdout>"
|
#line 2836 "<stdout>"
|
||||||
yy159:
|
yy159:
|
||||||
YYDEBUG(159, *YYCURSOR);
|
YYDEBUG(159, *YYCURSOR);
|
||||||
yyaccept = 1;
|
yyaccept = 1;
|
||||||
|
@ -3529,7 +3531,7 @@ yy189:
|
||||||
yy190:
|
yy190:
|
||||||
YYDEBUG(190, *YYCURSOR);
|
YYDEBUG(190, *YYCURSOR);
|
||||||
|
|
||||||
#line 1303 "resource/parse_date.re"
|
#line 1305 "resource/parse_date.re"
|
||||||
{
|
{
|
||||||
timelib_sll i;
|
timelib_sll i;
|
||||||
|
|
||||||
|
@ -3544,7 +3546,7 @@ yy190:
|
||||||
TIMELIB_DEINIT;
|
TIMELIB_DEINIT;
|
||||||
return TIMELIB_RELATIVE;
|
return TIMELIB_RELATIVE;
|
||||||
}
|
}
|
||||||
#line 3152 "<stdout>"
|
#line 3154 "<stdout>"
|
||||||
yy191:
|
yy191:
|
||||||
YYDEBUG(191, *YYCURSOR);
|
YYDEBUG(191, *YYCURSOR);
|
||||||
++YYCURSOR;
|
++YYCURSOR;
|
||||||
|
@ -9174,7 +9176,7 @@ yy508:
|
||||||
yy509:
|
yy509:
|
||||||
YYDEBUG(509, *YYCURSOR);
|
YYDEBUG(509, *YYCURSOR);
|
||||||
|
|
||||||
#line 1135 "resource/parse_date.re"
|
#line 1137 "resource/parse_date.re"
|
||||||
{
|
{
|
||||||
TIMELIB_INIT;
|
TIMELIB_INIT;
|
||||||
TIMELIB_HAVE_DATE();
|
TIMELIB_HAVE_DATE();
|
||||||
|
@ -9185,7 +9187,7 @@ yy509:
|
||||||
TIMELIB_DEINIT;
|
TIMELIB_DEINIT;
|
||||||
return TIMELIB_DATE_TEXT;
|
return TIMELIB_DATE_TEXT;
|
||||||
}
|
}
|
||||||
#line 8144 "<stdout>"
|
#line 8146 "<stdout>"
|
||||||
yy510:
|
yy510:
|
||||||
YYDEBUG(510, *YYCURSOR);
|
YYDEBUG(510, *YYCURSOR);
|
||||||
yych = *++YYCURSOR;
|
yych = *++YYCURSOR;
|
||||||
|
@ -9317,7 +9319,7 @@ yy526:
|
||||||
yy527:
|
yy527:
|
||||||
YYDEBUG(527, *YYCURSOR);
|
YYDEBUG(527, *YYCURSOR);
|
||||||
|
|
||||||
#line 1350 "resource/parse_date.re"
|
#line 1352 "resource/parse_date.re"
|
||||||
{
|
{
|
||||||
int tz_not_found;
|
int tz_not_found;
|
||||||
TIMELIB_INIT;
|
TIMELIB_INIT;
|
||||||
|
@ -9343,7 +9345,7 @@ yy527:
|
||||||
TIMELIB_DEINIT;
|
TIMELIB_DEINIT;
|
||||||
return TIMELIB_SHORTDATE_WITH_TIME;
|
return TIMELIB_SHORTDATE_WITH_TIME;
|
||||||
}
|
}
|
||||||
#line 8266 "<stdout>"
|
#line 8268 "<stdout>"
|
||||||
yy528:
|
yy528:
|
||||||
YYDEBUG(528, *YYCURSOR);
|
YYDEBUG(528, *YYCURSOR);
|
||||||
yyaccept = 7;
|
yyaccept = 7;
|
||||||
|
@ -9651,7 +9653,7 @@ yy561:
|
||||||
yy562:
|
yy562:
|
||||||
YYDEBUG(562, *YYCURSOR);
|
YYDEBUG(562, *YYCURSOR);
|
||||||
|
|
||||||
#line 1111 "resource/parse_date.re"
|
#line 1113 "resource/parse_date.re"
|
||||||
{
|
{
|
||||||
TIMELIB_INIT;
|
TIMELIB_INIT;
|
||||||
TIMELIB_HAVE_DATE();
|
TIMELIB_HAVE_DATE();
|
||||||
|
@ -9662,7 +9664,7 @@ yy562:
|
||||||
TIMELIB_DEINIT;
|
TIMELIB_DEINIT;
|
||||||
return TIMELIB_DATE_NO_DAY;
|
return TIMELIB_DATE_NO_DAY;
|
||||||
}
|
}
|
||||||
#line 8515 "<stdout>"
|
#line 8517 "<stdout>"
|
||||||
yy563:
|
yy563:
|
||||||
YYDEBUG(563, *YYCURSOR);
|
YYDEBUG(563, *YYCURSOR);
|
||||||
yyaccept = 6;
|
yyaccept = 6;
|
||||||
|
@ -9792,7 +9794,7 @@ yy576:
|
||||||
yy577:
|
yy577:
|
||||||
YYDEBUG(577, *YYCURSOR);
|
YYDEBUG(577, *YYCURSOR);
|
||||||
|
|
||||||
#line 1239 "resource/parse_date.re"
|
#line 1241 "resource/parse_date.re"
|
||||||
{
|
{
|
||||||
TIMELIB_INIT;
|
TIMELIB_INIT;
|
||||||
TIMELIB_HAVE_DATE();
|
TIMELIB_HAVE_DATE();
|
||||||
|
@ -9803,7 +9805,7 @@ yy577:
|
||||||
TIMELIB_DEINIT;
|
TIMELIB_DEINIT;
|
||||||
return TIMELIB_PG_TEXT;
|
return TIMELIB_PG_TEXT;
|
||||||
}
|
}
|
||||||
#line 8626 "<stdout>"
|
#line 8628 "<stdout>"
|
||||||
yy578:
|
yy578:
|
||||||
YYDEBUG(578, *YYCURSOR);
|
YYDEBUG(578, *YYCURSOR);
|
||||||
yych = *++YYCURSOR;
|
yych = *++YYCURSOR;
|
||||||
|
@ -11300,7 +11302,7 @@ yy672:
|
||||||
yy673:
|
yy673:
|
||||||
YYDEBUG(673, *YYCURSOR);
|
YYDEBUG(673, *YYCURSOR);
|
||||||
|
|
||||||
#line 1289 "resource/parse_date.re"
|
#line 1291 "resource/parse_date.re"
|
||||||
{
|
{
|
||||||
TIMELIB_INIT;
|
TIMELIB_INIT;
|
||||||
s->time->relative.y = 0 - s->time->relative.y;
|
s->time->relative.y = 0 - s->time->relative.y;
|
||||||
|
@ -11313,7 +11315,7 @@ yy673:
|
||||||
TIMELIB_DEINIT;
|
TIMELIB_DEINIT;
|
||||||
return TIMELIB_AGO;
|
return TIMELIB_AGO;
|
||||||
}
|
}
|
||||||
#line 9944 "<stdout>"
|
#line 9946 "<stdout>"
|
||||||
yy674:
|
yy674:
|
||||||
YYDEBUG(674, *YYCURSOR);
|
YYDEBUG(674, *YYCURSOR);
|
||||||
yyaccept = 1;
|
yyaccept = 1;
|
||||||
|
@ -13243,7 +13245,7 @@ yy776:
|
||||||
yy777:
|
yy777:
|
||||||
YYDEBUG(777, *YYCURSOR);
|
YYDEBUG(777, *YYCURSOR);
|
||||||
|
|
||||||
#line 1147 "resource/parse_date.re"
|
#line 1149 "resource/parse_date.re"
|
||||||
{
|
{
|
||||||
TIMELIB_INIT;
|
TIMELIB_INIT;
|
||||||
TIMELIB_HAVE_DATE();
|
TIMELIB_HAVE_DATE();
|
||||||
|
@ -13252,7 +13254,7 @@ yy777:
|
||||||
TIMELIB_DEINIT;
|
TIMELIB_DEINIT;
|
||||||
return TIMELIB_DATE_TEXT;
|
return TIMELIB_DATE_TEXT;
|
||||||
}
|
}
|
||||||
#line 11671 "<stdout>"
|
#line 11673 "<stdout>"
|
||||||
yy778:
|
yy778:
|
||||||
YYDEBUG(778, *YYCURSOR);
|
YYDEBUG(778, *YYCURSOR);
|
||||||
yyaccept = 10;
|
yyaccept = 10;
|
||||||
|
@ -13341,7 +13343,7 @@ yy785:
|
||||||
yy786:
|
yy786:
|
||||||
YYDEBUG(786, *YYCURSOR);
|
YYDEBUG(786, *YYCURSOR);
|
||||||
|
|
||||||
#line 963 "resource/parse_date.re"
|
#line 965 "resource/parse_date.re"
|
||||||
{
|
{
|
||||||
int tz_not_found;
|
int tz_not_found;
|
||||||
DEBUG_OUTPUT("timeshort24 | timelong24 | iso8601long");
|
DEBUG_OUTPUT("timeshort24 | timelong24 | iso8601long");
|
||||||
|
@ -13364,7 +13366,7 @@ yy786:
|
||||||
TIMELIB_DEINIT;
|
TIMELIB_DEINIT;
|
||||||
return TIMELIB_TIME24_WITH_ZONE;
|
return TIMELIB_TIME24_WITH_ZONE;
|
||||||
}
|
}
|
||||||
#line 11765 "<stdout>"
|
#line 11767 "<stdout>"
|
||||||
yy787:
|
yy787:
|
||||||
YYDEBUG(787, *YYCURSOR);
|
YYDEBUG(787, *YYCURSOR);
|
||||||
yyaccept = 11;
|
yyaccept = 11;
|
||||||
|
@ -13491,7 +13493,7 @@ yy800:
|
||||||
yy801:
|
yy801:
|
||||||
YYDEBUG(801, *YYCURSOR);
|
YYDEBUG(801, *YYCURSOR);
|
||||||
|
|
||||||
#line 948 "resource/parse_date.re"
|
#line 950 "resource/parse_date.re"
|
||||||
{
|
{
|
||||||
DEBUG_OUTPUT("timeshort12 | timelong12");
|
DEBUG_OUTPUT("timeshort12 | timelong12");
|
||||||
TIMELIB_INIT;
|
TIMELIB_INIT;
|
||||||
|
@ -13505,7 +13507,7 @@ yy801:
|
||||||
TIMELIB_DEINIT;
|
TIMELIB_DEINIT;
|
||||||
return TIMELIB_TIME12;
|
return TIMELIB_TIME12;
|
||||||
}
|
}
|
||||||
#line 11876 "<stdout>"
|
#line 11878 "<stdout>"
|
||||||
yy802:
|
yy802:
|
||||||
YYDEBUG(802, *YYCURSOR);
|
YYDEBUG(802, *YYCURSOR);
|
||||||
yych = *++YYCURSOR;
|
yych = *++YYCURSOR;
|
||||||
|
@ -13627,7 +13629,7 @@ yy813:
|
||||||
yy814:
|
yy814:
|
||||||
YYDEBUG(814, *YYCURSOR);
|
YYDEBUG(814, *YYCURSOR);
|
||||||
|
|
||||||
#line 1087 "resource/parse_date.re"
|
#line 1089 "resource/parse_date.re"
|
||||||
{
|
{
|
||||||
TIMELIB_INIT;
|
TIMELIB_INIT;
|
||||||
TIMELIB_HAVE_DATE();
|
TIMELIB_HAVE_DATE();
|
||||||
|
@ -13638,7 +13640,7 @@ yy814:
|
||||||
TIMELIB_DEINIT;
|
TIMELIB_DEINIT;
|
||||||
return TIMELIB_DATE_FULL;
|
return TIMELIB_DATE_FULL;
|
||||||
}
|
}
|
||||||
#line 11983 "<stdout>"
|
#line 11985 "<stdout>"
|
||||||
yy815:
|
yy815:
|
||||||
YYDEBUG(815, *YYCURSOR);
|
YYDEBUG(815, *YYCURSOR);
|
||||||
yych = *++YYCURSOR;
|
yych = *++YYCURSOR;
|
||||||
|
@ -14000,7 +14002,7 @@ yy855:
|
||||||
yy856:
|
yy856:
|
||||||
YYDEBUG(856, *YYCURSOR);
|
YYDEBUG(856, *YYCURSOR);
|
||||||
|
|
||||||
#line 1099 "resource/parse_date.re"
|
#line 1101 "resource/parse_date.re"
|
||||||
{
|
{
|
||||||
TIMELIB_INIT;
|
TIMELIB_INIT;
|
||||||
TIMELIB_HAVE_DATE();
|
TIMELIB_HAVE_DATE();
|
||||||
|
@ -14011,7 +14013,7 @@ yy856:
|
||||||
TIMELIB_DEINIT;
|
TIMELIB_DEINIT;
|
||||||
return TIMELIB_DATE_FULL_POINTED;
|
return TIMELIB_DATE_FULL_POINTED;
|
||||||
}
|
}
|
||||||
#line 12272 "<stdout>"
|
#line 12274 "<stdout>"
|
||||||
yy857:
|
yy857:
|
||||||
YYDEBUG(857, *YYCURSOR);
|
YYDEBUG(857, *YYCURSOR);
|
||||||
yych = *++YYCURSOR;
|
yych = *++YYCURSOR;
|
||||||
|
@ -14738,7 +14740,7 @@ yy922:
|
||||||
yy923:
|
yy923:
|
||||||
YYDEBUG(923, *YYCURSOR);
|
YYDEBUG(923, *YYCURSOR);
|
||||||
|
|
||||||
#line 1075 "resource/parse_date.re"
|
#line 1077 "resource/parse_date.re"
|
||||||
{
|
{
|
||||||
TIMELIB_INIT;
|
TIMELIB_INIT;
|
||||||
TIMELIB_HAVE_DATE();
|
TIMELIB_HAVE_DATE();
|
||||||
|
@ -14749,7 +14751,7 @@ yy923:
|
||||||
TIMELIB_DEINIT;
|
TIMELIB_DEINIT;
|
||||||
return TIMELIB_ISO_DATE;
|
return TIMELIB_ISO_DATE;
|
||||||
}
|
}
|
||||||
#line 12876 "<stdout>"
|
#line 12878 "<stdout>"
|
||||||
yy924:
|
yy924:
|
||||||
YYDEBUG(924, *YYCURSOR);
|
YYDEBUG(924, *YYCURSOR);
|
||||||
yych = *++YYCURSOR;
|
yych = *++YYCURSOR;
|
||||||
|
@ -14771,7 +14773,7 @@ yy926:
|
||||||
yy927:
|
yy927:
|
||||||
YYDEBUG(927, *YYCURSOR);
|
YYDEBUG(927, *YYCURSOR);
|
||||||
|
|
||||||
#line 1050 "resource/parse_date.re"
|
#line 1052 "resource/parse_date.re"
|
||||||
{
|
{
|
||||||
TIMELIB_INIT;
|
TIMELIB_INIT;
|
||||||
TIMELIB_HAVE_DATE();
|
TIMELIB_HAVE_DATE();
|
||||||
|
@ -14784,7 +14786,7 @@ yy927:
|
||||||
TIMELIB_DEINIT;
|
TIMELIB_DEINIT;
|
||||||
return TIMELIB_AMERICAN;
|
return TIMELIB_AMERICAN;
|
||||||
}
|
}
|
||||||
#line 12903 "<stdout>"
|
#line 12905 "<stdout>"
|
||||||
yy928:
|
yy928:
|
||||||
YYDEBUG(928, *YYCURSOR);
|
YYDEBUG(928, *YYCURSOR);
|
||||||
yyaccept = 12;
|
yyaccept = 12;
|
||||||
|
@ -15006,7 +15008,7 @@ yy959:
|
||||||
yy960:
|
yy960:
|
||||||
YYDEBUG(960, *YYCURSOR);
|
YYDEBUG(960, *YYCURSOR);
|
||||||
|
|
||||||
#line 1263 "resource/parse_date.re"
|
#line 1265 "resource/parse_date.re"
|
||||||
{
|
{
|
||||||
int tz_not_found;
|
int tz_not_found;
|
||||||
TIMELIB_INIT;
|
TIMELIB_INIT;
|
||||||
|
@ -15023,7 +15025,7 @@ yy960:
|
||||||
TIMELIB_DEINIT;
|
TIMELIB_DEINIT;
|
||||||
return TIMELIB_CLF;
|
return TIMELIB_CLF;
|
||||||
}
|
}
|
||||||
#line 13076 "<stdout>"
|
#line 13078 "<stdout>"
|
||||||
yy961:
|
yy961:
|
||||||
YYDEBUG(961, *YYCURSOR);
|
YYDEBUG(961, *YYCURSOR);
|
||||||
yyaccept = 13;
|
yyaccept = 13;
|
||||||
|
@ -15332,7 +15334,7 @@ yy999:
|
||||||
yy1000:
|
yy1000:
|
||||||
YYDEBUG(1000, *YYCURSOR);
|
YYDEBUG(1000, *YYCURSOR);
|
||||||
|
|
||||||
#line 1251 "resource/parse_date.re"
|
#line 1253 "resource/parse_date.re"
|
||||||
{
|
{
|
||||||
TIMELIB_INIT;
|
TIMELIB_INIT;
|
||||||
TIMELIB_HAVE_DATE();
|
TIMELIB_HAVE_DATE();
|
||||||
|
@ -15343,7 +15345,7 @@ yy1000:
|
||||||
TIMELIB_DEINIT;
|
TIMELIB_DEINIT;
|
||||||
return TIMELIB_PG_TEXT;
|
return TIMELIB_PG_TEXT;
|
||||||
}
|
}
|
||||||
#line 13315 "<stdout>"
|
#line 13317 "<stdout>"
|
||||||
yy1001:
|
yy1001:
|
||||||
YYDEBUG(1001, *YYCURSOR);
|
YYDEBUG(1001, *YYCURSOR);
|
||||||
yych = *++YYCURSOR;
|
yych = *++YYCURSOR;
|
||||||
|
@ -15476,14 +15478,14 @@ yy1011:
|
||||||
yy1012:
|
yy1012:
|
||||||
YYDEBUG(1012, *YYCURSOR);
|
YYDEBUG(1012, *YYCURSOR);
|
||||||
|
|
||||||
#line 1281 "resource/parse_date.re"
|
#line 1283 "resource/parse_date.re"
|
||||||
{
|
{
|
||||||
TIMELIB_INIT;
|
TIMELIB_INIT;
|
||||||
s->time->y = timelib_get_nr((char **) &ptr, 4);
|
s->time->y = timelib_get_nr((char **) &ptr, 4);
|
||||||
TIMELIB_DEINIT;
|
TIMELIB_DEINIT;
|
||||||
return TIMELIB_CLF;
|
return TIMELIB_CLF;
|
||||||
}
|
}
|
||||||
#line 13430 "<stdout>"
|
#line 13432 "<stdout>"
|
||||||
yy1013:
|
yy1013:
|
||||||
YYDEBUG(1013, *YYCURSOR);
|
YYDEBUG(1013, *YYCURSOR);
|
||||||
yych = *++YYCURSOR;
|
yych = *++YYCURSOR;
|
||||||
|
@ -15618,7 +15620,7 @@ yy1020:
|
||||||
yy1021:
|
yy1021:
|
||||||
YYDEBUG(1021, *YYCURSOR);
|
YYDEBUG(1021, *YYCURSOR);
|
||||||
|
|
||||||
#line 1123 "resource/parse_date.re"
|
#line 1125 "resource/parse_date.re"
|
||||||
{
|
{
|
||||||
TIMELIB_INIT;
|
TIMELIB_INIT;
|
||||||
TIMELIB_HAVE_DATE();
|
TIMELIB_HAVE_DATE();
|
||||||
|
@ -15629,7 +15631,7 @@ yy1021:
|
||||||
TIMELIB_DEINIT;
|
TIMELIB_DEINIT;
|
||||||
return TIMELIB_DATE_NO_DAY;
|
return TIMELIB_DATE_NO_DAY;
|
||||||
}
|
}
|
||||||
#line 13555 "<stdout>"
|
#line 13557 "<stdout>"
|
||||||
yy1022:
|
yy1022:
|
||||||
YYDEBUG(1022, *YYCURSOR);
|
YYDEBUG(1022, *YYCURSOR);
|
||||||
yych = *++YYCURSOR;
|
yych = *++YYCURSOR;
|
||||||
|
@ -15838,7 +15840,7 @@ yy1040:
|
||||||
yy1041:
|
yy1041:
|
||||||
YYDEBUG(1041, *YYCURSOR);
|
YYDEBUG(1041, *YYCURSOR);
|
||||||
|
|
||||||
#line 1220 "resource/parse_date.re"
|
#line 1222 "resource/parse_date.re"
|
||||||
{
|
{
|
||||||
timelib_sll w, d;
|
timelib_sll w, d;
|
||||||
|
|
||||||
|
@ -15856,7 +15858,7 @@ yy1041:
|
||||||
TIMELIB_DEINIT;
|
TIMELIB_DEINIT;
|
||||||
return TIMELIB_ISO_WEEK;
|
return TIMELIB_ISO_WEEK;
|
||||||
}
|
}
|
||||||
#line 13742 "<stdout>"
|
#line 13744 "<stdout>"
|
||||||
yy1042:
|
yy1042:
|
||||||
YYDEBUG(1042, *YYCURSOR);
|
YYDEBUG(1042, *YYCURSOR);
|
||||||
++YYCURSOR;
|
++YYCURSOR;
|
||||||
|
@ -15864,7 +15866,7 @@ yy1042:
|
||||||
yy1043:
|
yy1043:
|
||||||
YYDEBUG(1043, *YYCURSOR);
|
YYDEBUG(1043, *YYCURSOR);
|
||||||
|
|
||||||
#line 1201 "resource/parse_date.re"
|
#line 1203 "resource/parse_date.re"
|
||||||
{
|
{
|
||||||
timelib_sll w, d;
|
timelib_sll w, d;
|
||||||
|
|
||||||
|
@ -15882,7 +15884,7 @@ yy1043:
|
||||||
TIMELIB_DEINIT;
|
TIMELIB_DEINIT;
|
||||||
return TIMELIB_ISO_WEEK;
|
return TIMELIB_ISO_WEEK;
|
||||||
}
|
}
|
||||||
#line 13764 "<stdout>"
|
#line 13766 "<stdout>"
|
||||||
yy1044:
|
yy1044:
|
||||||
YYDEBUG(1044, *YYCURSOR);
|
YYDEBUG(1044, *YYCURSOR);
|
||||||
yych = *++YYCURSOR;
|
yych = *++YYCURSOR;
|
||||||
|
@ -15951,7 +15953,7 @@ yy1046:
|
||||||
yy1047:
|
yy1047:
|
||||||
YYDEBUG(1047, *YYCURSOR);
|
YYDEBUG(1047, *YYCURSOR);
|
||||||
|
|
||||||
#line 1189 "resource/parse_date.re"
|
#line 1191 "resource/parse_date.re"
|
||||||
{
|
{
|
||||||
TIMELIB_INIT;
|
TIMELIB_INIT;
|
||||||
TIMELIB_HAVE_DATE();
|
TIMELIB_HAVE_DATE();
|
||||||
|
@ -15962,7 +15964,7 @@ yy1047:
|
||||||
TIMELIB_DEINIT;
|
TIMELIB_DEINIT;
|
||||||
return TIMELIB_PG_YEARDAY;
|
return TIMELIB_PG_YEARDAY;
|
||||||
}
|
}
|
||||||
#line 13836 "<stdout>"
|
#line 13838 "<stdout>"
|
||||||
yy1048:
|
yy1048:
|
||||||
YYDEBUG(1048, *YYCURSOR);
|
YYDEBUG(1048, *YYCURSOR);
|
||||||
yych = *++YYCURSOR;
|
yych = *++YYCURSOR;
|
||||||
|
@ -16077,7 +16079,7 @@ yy1053:
|
||||||
yy1054:
|
yy1054:
|
||||||
YYDEBUG(1054, *YYCURSOR);
|
YYDEBUG(1054, *YYCURSOR);
|
||||||
|
|
||||||
#line 1157 "resource/parse_date.re"
|
#line 1159 "resource/parse_date.re"
|
||||||
{
|
{
|
||||||
TIMELIB_INIT;
|
TIMELIB_INIT;
|
||||||
TIMELIB_HAVE_DATE();
|
TIMELIB_HAVE_DATE();
|
||||||
|
@ -16087,7 +16089,7 @@ yy1054:
|
||||||
TIMELIB_DEINIT;
|
TIMELIB_DEINIT;
|
||||||
return TIMELIB_DATE_NOCOLON;
|
return TIMELIB_DATE_NOCOLON;
|
||||||
}
|
}
|
||||||
#line 13943 "<stdout>"
|
#line 13945 "<stdout>"
|
||||||
yy1055:
|
yy1055:
|
||||||
YYDEBUG(1055, *YYCURSOR);
|
YYDEBUG(1055, *YYCURSOR);
|
||||||
yych = *++YYCURSOR;
|
yych = *++YYCURSOR;
|
||||||
|
@ -16185,7 +16187,7 @@ yy1064:
|
||||||
yy1065:
|
yy1065:
|
||||||
YYDEBUG(1065, *YYCURSOR);
|
YYDEBUG(1065, *YYCURSOR);
|
||||||
|
|
||||||
#line 1168 "resource/parse_date.re"
|
#line 1170 "resource/parse_date.re"
|
||||||
{
|
{
|
||||||
int tz_not_found;
|
int tz_not_found;
|
||||||
TIMELIB_INIT;
|
TIMELIB_INIT;
|
||||||
|
@ -16205,7 +16207,7 @@ yy1065:
|
||||||
TIMELIB_DEINIT;
|
TIMELIB_DEINIT;
|
||||||
return TIMELIB_XMLRPC_SOAP;
|
return TIMELIB_XMLRPC_SOAP;
|
||||||
}
|
}
|
||||||
#line 14039 "<stdout>"
|
#line 14041 "<stdout>"
|
||||||
yy1066:
|
yy1066:
|
||||||
YYDEBUG(1066, *YYCURSOR);
|
YYDEBUG(1066, *YYCURSOR);
|
||||||
yych = *++YYCURSOR;
|
yych = *++YYCURSOR;
|
||||||
|
@ -16822,7 +16824,7 @@ yy1158:
|
||||||
yy1159:
|
yy1159:
|
||||||
YYDEBUG(1159, *YYCURSOR);
|
YYDEBUG(1159, *YYCURSOR);
|
||||||
|
|
||||||
#line 1064 "resource/parse_date.re"
|
#line 1066 "resource/parse_date.re"
|
||||||
{
|
{
|
||||||
TIMELIB_INIT;
|
TIMELIB_INIT;
|
||||||
TIMELIB_HAVE_DATE();
|
TIMELIB_HAVE_DATE();
|
||||||
|
@ -16832,7 +16834,7 @@ yy1159:
|
||||||
TIMELIB_DEINIT;
|
TIMELIB_DEINIT;
|
||||||
return TIMELIB_ISO_DATE;
|
return TIMELIB_ISO_DATE;
|
||||||
}
|
}
|
||||||
#line 14478 "<stdout>"
|
#line 14480 "<stdout>"
|
||||||
yy1160:
|
yy1160:
|
||||||
YYDEBUG(1160, *YYCURSOR);
|
YYDEBUG(1160, *YYCURSOR);
|
||||||
yych = *++YYCURSOR;
|
yych = *++YYCURSOR;
|
||||||
|
@ -17507,7 +17509,7 @@ yy1235:
|
||||||
yy1236:
|
yy1236:
|
||||||
YYDEBUG(1236, *YYCURSOR);
|
YYDEBUG(1236, *YYCURSOR);
|
||||||
|
|
||||||
#line 987 "resource/parse_date.re"
|
#line 989 "resource/parse_date.re"
|
||||||
{
|
{
|
||||||
DEBUG_OUTPUT("gnunocolon");
|
DEBUG_OUTPUT("gnunocolon");
|
||||||
TIMELIB_INIT;
|
TIMELIB_INIT;
|
||||||
|
@ -17528,7 +17530,7 @@ yy1236:
|
||||||
TIMELIB_DEINIT;
|
TIMELIB_DEINIT;
|
||||||
return TIMELIB_GNU_NOCOLON;
|
return TIMELIB_GNU_NOCOLON;
|
||||||
}
|
}
|
||||||
#line 15018 "<stdout>"
|
#line 15020 "<stdout>"
|
||||||
yy1237:
|
yy1237:
|
||||||
YYDEBUG(1237, *YYCURSOR);
|
YYDEBUG(1237, *YYCURSOR);
|
||||||
yych = *++YYCURSOR;
|
yych = *++YYCURSOR;
|
||||||
|
@ -17625,7 +17627,7 @@ yy1243:
|
||||||
yy1244:
|
yy1244:
|
||||||
YYDEBUG(1244, *YYCURSOR);
|
YYDEBUG(1244, *YYCURSOR);
|
||||||
|
|
||||||
#line 1032 "resource/parse_date.re"
|
#line 1034 "resource/parse_date.re"
|
||||||
{
|
{
|
||||||
int tz_not_found;
|
int tz_not_found;
|
||||||
DEBUG_OUTPUT("iso8601nocolon");
|
DEBUG_OUTPUT("iso8601nocolon");
|
||||||
|
@ -17642,7 +17644,7 @@ yy1244:
|
||||||
TIMELIB_DEINIT;
|
TIMELIB_DEINIT;
|
||||||
return TIMELIB_ISO_NOCOLON;
|
return TIMELIB_ISO_NOCOLON;
|
||||||
}
|
}
|
||||||
#line 15116 "<stdout>"
|
#line 15118 "<stdout>"
|
||||||
yy1245:
|
yy1245:
|
||||||
YYDEBUG(1245, *YYCURSOR);
|
YYDEBUG(1245, *YYCURSOR);
|
||||||
yyaccept = 21;
|
yyaccept = 21;
|
||||||
|
@ -17854,7 +17856,7 @@ yy1260:
|
||||||
yy1261:
|
yy1261:
|
||||||
YYDEBUG(1261, *YYCURSOR);
|
YYDEBUG(1261, *YYCURSOR);
|
||||||
|
|
||||||
#line 924 "resource/parse_date.re"
|
#line 926 "resource/parse_date.re"
|
||||||
{
|
{
|
||||||
timelib_ull i;
|
timelib_ull i;
|
||||||
|
|
||||||
|
@ -17877,7 +17879,7 @@ yy1261:
|
||||||
TIMELIB_DEINIT;
|
TIMELIB_DEINIT;
|
||||||
return TIMELIB_RELATIVE;
|
return TIMELIB_RELATIVE;
|
||||||
}
|
}
|
||||||
#line 15311 "<stdout>"
|
#line 15313 "<stdout>"
|
||||||
yy1262:
|
yy1262:
|
||||||
YYDEBUG(1262, *YYCURSOR);
|
YYDEBUG(1262, *YYCURSOR);
|
||||||
yych = *++YYCURSOR;
|
yych = *++YYCURSOR;
|
||||||
|
@ -17948,7 +17950,7 @@ yy1269:
|
||||||
yy1270:
|
yy1270:
|
||||||
YYDEBUG(1270, *YYCURSOR);
|
YYDEBUG(1270, *YYCURSOR);
|
||||||
|
|
||||||
#line 912 "resource/parse_date.re"
|
#line 914 "resource/parse_date.re"
|
||||||
{
|
{
|
||||||
DEBUG_OUTPUT("tomorrow");
|
DEBUG_OUTPUT("tomorrow");
|
||||||
TIMELIB_INIT;
|
TIMELIB_INIT;
|
||||||
|
@ -17959,7 +17961,7 @@ yy1270:
|
||||||
TIMELIB_DEINIT;
|
TIMELIB_DEINIT;
|
||||||
return TIMELIB_RELATIVE;
|
return TIMELIB_RELATIVE;
|
||||||
}
|
}
|
||||||
#line 15375 "<stdout>"
|
#line 15377 "<stdout>"
|
||||||
yy1271:
|
yy1271:
|
||||||
YYDEBUG(1271, *YYCURSOR);
|
YYDEBUG(1271, *YYCURSOR);
|
||||||
yych = *++YYCURSOR;
|
yych = *++YYCURSOR;
|
||||||
|
@ -17972,7 +17974,7 @@ yy1272:
|
||||||
yy1273:
|
yy1273:
|
||||||
YYDEBUG(1273, *YYCURSOR);
|
YYDEBUG(1273, *YYCURSOR);
|
||||||
|
|
||||||
#line 902 "resource/parse_date.re"
|
#line 904 "resource/parse_date.re"
|
||||||
{
|
{
|
||||||
DEBUG_OUTPUT("today");
|
DEBUG_OUTPUT("today");
|
||||||
TIMELIB_INIT;
|
TIMELIB_INIT;
|
||||||
|
@ -17981,7 +17983,7 @@ yy1273:
|
||||||
TIMELIB_DEINIT;
|
TIMELIB_DEINIT;
|
||||||
return TIMELIB_RELATIVE;
|
return TIMELIB_RELATIVE;
|
||||||
}
|
}
|
||||||
#line 15391 "<stdout>"
|
#line 15393 "<stdout>"
|
||||||
yy1274:
|
yy1274:
|
||||||
YYDEBUG(1274, *YYCURSOR);
|
YYDEBUG(1274, *YYCURSOR);
|
||||||
yych = *++YYCURSOR;
|
yych = *++YYCURSOR;
|
||||||
|
@ -18015,7 +18017,7 @@ yy1275:
|
||||||
yy1276:
|
yy1276:
|
||||||
YYDEBUG(1276, *YYCURSOR);
|
YYDEBUG(1276, *YYCURSOR);
|
||||||
|
|
||||||
#line 893 "resource/parse_date.re"
|
#line 895 "resource/parse_date.re"
|
||||||
{
|
{
|
||||||
DEBUG_OUTPUT("now");
|
DEBUG_OUTPUT("now");
|
||||||
TIMELIB_INIT;
|
TIMELIB_INIT;
|
||||||
|
@ -18023,7 +18025,7 @@ yy1276:
|
||||||
TIMELIB_DEINIT;
|
TIMELIB_DEINIT;
|
||||||
return TIMELIB_RELATIVE;
|
return TIMELIB_RELATIVE;
|
||||||
}
|
}
|
||||||
#line 15427 "<stdout>"
|
#line 15429 "<stdout>"
|
||||||
yy1277:
|
yy1277:
|
||||||
YYDEBUG(1277, *YYCURSOR);
|
YYDEBUG(1277, *YYCURSOR);
|
||||||
yych = *++YYCURSOR;
|
yych = *++YYCURSOR;
|
||||||
|
@ -18081,7 +18083,7 @@ yy1284:
|
||||||
yy1285:
|
yy1285:
|
||||||
YYDEBUG(1285, *YYCURSOR);
|
YYDEBUG(1285, *YYCURSOR);
|
||||||
|
|
||||||
#line 881 "resource/parse_date.re"
|
#line 883 "resource/parse_date.re"
|
||||||
{
|
{
|
||||||
DEBUG_OUTPUT("yesterday");
|
DEBUG_OUTPUT("yesterday");
|
||||||
TIMELIB_INIT;
|
TIMELIB_INIT;
|
||||||
|
@ -18092,10 +18094,10 @@ yy1285:
|
||||||
TIMELIB_DEINIT;
|
TIMELIB_DEINIT;
|
||||||
return TIMELIB_RELATIVE;
|
return TIMELIB_RELATIVE;
|
||||||
}
|
}
|
||||||
#line 15478 "<stdout>"
|
#line 15480 "<stdout>"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#line 1409 "resource/parse_date.re"
|
#line 1411 "resource/parse_date.re"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -710,6 +710,7 @@ static long timelib_get_zone(char **ptr, int *dst, timelib_time *t, int *tz_not_
|
||||||
t->is_localtime = 1;
|
t->is_localtime = 1;
|
||||||
t->zone_type = TIMELIB_ZONETYPE_OFFSET;
|
t->zone_type = TIMELIB_ZONETYPE_OFFSET;
|
||||||
*tz_not_found = 0;
|
*tz_not_found = 0;
|
||||||
|
t->dst = 0;
|
||||||
|
|
||||||
return -1 * timelib_parse_tz_cor(ptr);
|
return -1 * timelib_parse_tz_cor(ptr);
|
||||||
} else if (**ptr == '-') {
|
} else if (**ptr == '-') {
|
||||||
|
@ -717,6 +718,7 @@ static long timelib_get_zone(char **ptr, int *dst, timelib_time *t, int *tz_not_
|
||||||
t->is_localtime = 1;
|
t->is_localtime = 1;
|
||||||
t->zone_type = TIMELIB_ZONETYPE_OFFSET;
|
t->zone_type = TIMELIB_ZONETYPE_OFFSET;
|
||||||
*tz_not_found = 0;
|
*tz_not_found = 0;
|
||||||
|
t->dst = 0;
|
||||||
|
|
||||||
return timelib_parse_tz_cor(ptr);
|
return timelib_parse_tz_cor(ptr);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -710,6 +710,7 @@ static long timelib_get_zone(char **ptr, int *dst, timelib_time *t, int *tz_not_
|
||||||
t->is_localtime = 1;
|
t->is_localtime = 1;
|
||||||
t->zone_type = TIMELIB_ZONETYPE_OFFSET;
|
t->zone_type = TIMELIB_ZONETYPE_OFFSET;
|
||||||
*tz_not_found = 0;
|
*tz_not_found = 0;
|
||||||
|
t->dst = 0;
|
||||||
|
|
||||||
return -1 * timelib_parse_tz_cor(ptr);
|
return -1 * timelib_parse_tz_cor(ptr);
|
||||||
} else if (**ptr == '-') {
|
} else if (**ptr == '-') {
|
||||||
|
@ -717,6 +718,7 @@ static long timelib_get_zone(char **ptr, int *dst, timelib_time *t, int *tz_not_
|
||||||
t->is_localtime = 1;
|
t->is_localtime = 1;
|
||||||
t->zone_type = TIMELIB_ZONETYPE_OFFSET;
|
t->zone_type = TIMELIB_ZONETYPE_OFFSET;
|
||||||
*tz_not_found = 0;
|
*tz_not_found = 0;
|
||||||
|
t->dst = 0;
|
||||||
|
|
||||||
return timelib_parse_tz_cor(ptr);
|
return timelib_parse_tz_cor(ptr);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -88,11 +88,13 @@ function_entry date_funcs_timezone[] = {
|
||||||
{NULL, NULL, NULL}
|
{NULL, NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
static void date_register_classes(void);
|
static void date_register_classes(TSRMLS_D);
|
||||||
# define DATE_REGISTER_CLASSES date_register_classes()
|
# define DATE_REGISTER_CLASSES date_register_classes(TSRMLS_C)
|
||||||
#else
|
#else
|
||||||
# define DATE_REGISTER_CLASSES /* */
|
# define DATE_REGISTER_CLASSES /* */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static char* guess_timezone(TSRMLS_D);
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
ZEND_DECLARE_MODULE_GLOBALS(date)
|
ZEND_DECLARE_MODULE_GLOBALS(date)
|
||||||
|
@ -237,7 +239,10 @@ PHP_MINFO_FUNCTION(date)
|
||||||
{
|
{
|
||||||
php_info_print_table_start();
|
php_info_print_table_start();
|
||||||
php_info_print_table_row(2, "date/time support", "enabled");
|
php_info_print_table_row(2, "date/time support", "enabled");
|
||||||
|
php_info_print_table_row(2, "Default timezone", guess_timezone(TSRMLS_C));
|
||||||
php_info_print_table_end();
|
php_info_print_table_end();
|
||||||
|
|
||||||
|
DISPLAY_INI_ENTRIES();
|
||||||
}
|
}
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
|
@ -925,7 +930,6 @@ PHP_FUNCTION(getdate)
|
||||||
static zend_object_value date_object_new_date(zend_class_entry *class_type TSRMLS_DC)
|
static zend_object_value date_object_new_date(zend_class_entry *class_type TSRMLS_DC)
|
||||||
{
|
{
|
||||||
php_date_obj *intern;
|
php_date_obj *intern;
|
||||||
zval *tmp;
|
|
||||||
zend_object_value retval;
|
zend_object_value retval;
|
||||||
|
|
||||||
intern = emalloc(sizeof(php_date_obj));
|
intern = emalloc(sizeof(php_date_obj));
|
||||||
|
@ -941,7 +945,6 @@ static zend_object_value date_object_new_date(zend_class_entry *class_type TSRML
|
||||||
static zend_object_value date_object_new_timezone(zend_class_entry *class_type TSRMLS_DC)
|
static zend_object_value date_object_new_timezone(zend_class_entry *class_type TSRMLS_DC)
|
||||||
{
|
{
|
||||||
php_timezone_obj *intern;
|
php_timezone_obj *intern;
|
||||||
zval *tmp;
|
|
||||||
zend_object_value retval;
|
zend_object_value retval;
|
||||||
|
|
||||||
intern = emalloc(sizeof(php_timezone_obj));
|
intern = emalloc(sizeof(php_timezone_obj));
|
||||||
|
@ -975,7 +978,7 @@ static void date_object_free_storage_timezone(void *object TSRMLS_DC)
|
||||||
efree(object);
|
efree(object);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void date_register_classes(void)
|
static void date_register_classes(TSRMLS_D)
|
||||||
{
|
{
|
||||||
zend_class_entry ce_date, ce_timezone;
|
zend_class_entry ce_date, ce_timezone;
|
||||||
|
|
||||||
|
|
|
@ -87,7 +87,7 @@ wanted=Tuesday 00:00:00
|
||||||
|
|
||||||
TZ=America/Port-au-Prince - wrong day.
|
TZ=America/Port-au-Prince - wrong day.
|
||||||
tStamp=Monday 2005-03-28 17:17:17 EST 0
|
tStamp=Monday 2005-03-28 17:17:17 EST 0
|
||||||
result=Monday 2005-04-04 00:00:00 EST 0
|
result=Monday 2005-04-04 00:00:00 EDT 1
|
||||||
wanted=Monday 00:00:00
|
wanted=Monday 00:00:00
|
||||||
|
|
||||||
TZ=Pacific/Enderbury - wrong day, off by 2 days.
|
TZ=Pacific/Enderbury - wrong day, off by 2 days.
|
||||||
|
@ -102,7 +102,7 @@ wanted=Monday 00:00:00
|
||||||
|
|
||||||
TZ=America/Managua - wrong day.
|
TZ=America/Managua - wrong day.
|
||||||
tStamp=Tuesday 2005-04-05 17:17:17 CST 0
|
tStamp=Tuesday 2005-04-05 17:17:17 CST 0
|
||||||
result=Tuesday 2005-04-12 00:00:00 CST 0
|
result=Tuesday 2005-04-12 00:00:00 CDT 1
|
||||||
wanted=Tuesday 00:00:00
|
wanted=Tuesday 00:00:00
|
||||||
|
|
||||||
TZ=Pacific/Pitcairn - wrong day.
|
TZ=Pacific/Pitcairn - wrong day.
|
||||||
|
|
11
ext/date/tests/date_create-3.phpt
Normal file
11
ext/date/tests/date_create-3.phpt
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
--TEST--
|
||||||
|
date_create() function [3]
|
||||||
|
--FILE--
|
||||||
|
<?php
|
||||||
|
date_default_timezone_set("GMT");
|
||||||
|
echo date_format(date_create("Dec31 2005 +0100"), DATE_ISO8601), "\n";
|
||||||
|
echo date(DATE_ISO8601, strtotime("Dec31 2005 +0100")), "\n";
|
||||||
|
?>
|
||||||
|
--EXPECT--
|
||||||
|
2005-12-31T00:00:00+0100
|
||||||
|
2005-12-31T00:00:00+0100
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
mktime()
|
mktime() [2]
|
||||||
--INI--
|
--INI--
|
||||||
error_reporting=2047
|
error_reporting=2047
|
||||||
--FILE--
|
--FILE--
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue