]> granicus.if.org Git - php/commitdiff
Fixed UTC handling problem stemming from an earlier fix for bug #35422.
authorIlia Alshanetsky <iliaa@php.net>
Sun, 18 Dec 2005 16:15:45 +0000 (16:15 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Sun, 18 Dec 2005 16:15:45 +0000 (16:15 +0000)
ext/date/lib/parse_date.c
ext/date/lib/parse_date.re
ext/date/tests/date_default_timezone_get-1.phpt
ext/date/tests/date_default_timezone_set-1.phpt

index e8c08ea646fcae18e194e1da679bcdf7068d737b..5ca52f6bfa90866f01e1f773ddb6401994b08a73 100644 (file)
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.9.11.rc1 on Fri Dec 16 17:30:27 2005 */
+/* Generated by re2c 0.9.11.rc1 on Sun Dec 18 10:54:51 2005 */
 #line 1 "ext/date/lib/parse_date.re"
 /*
    +----------------------------------------------------------------------+
@@ -584,6 +584,9 @@ static timelib_tz_lookup_table* zone_search(const char *word, long gmtoffset, in
        timelib_tz_lookup_table  *tp, *first_found_elem;
        timelib_tz_lookup_table  *fmp;
        
+       if (gmtoffset != -1 && !strcmp(word, "UTC")) {
+               goto skip_name_match;
+       }
        for (tp = timelib_timezone_lookup; tp->name; tp++) {
                if (strcasecmp(word, tp->name) == 0) {
                        if (!first_found) {
@@ -601,6 +604,7 @@ static timelib_tz_lookup_table* zone_search(const char *word, long gmtoffset, in
        if (first_found) {
                return first_found_elem;
        }
+skip_name_match:
        /* Still didn't find anything, let's find the zone solely based on
         * offset/isdst then */
        for (fmp = timelib_timezone_fallbackmap; fmp->name; fmp++) {
@@ -719,7 +723,7 @@ static int scan(Scanner *s)
 std:
        s->tok = cursor;
        s->len = 0;
-#line 828 "ext/date/lib/parse_date.re"
+#line 832 "ext/date/lib/parse_date.re"
 
 
 {
@@ -758,7 +762,7 @@ std:
          0,   0,   0,   0,   0,   0,   0,   0, 
        };
 
-#line 762 "ext/date/lib/parse_date.c"
+#line 766 "ext/date/lib/parse_date.c"
 {
        YYCTYPE yych;
        unsigned int yyaccept = 0;
@@ -850,7 +854,7 @@ yy2:
 yy3:
        YYDEBUG(3, *YYCURSOR);
 
-#line 1323 "ext/date/lib/parse_date.re"
+#line 1327 "ext/date/lib/parse_date.re"
 {
                int tz_not_found;
                DEBUG_OUTPUT("tzcorrection | tz");
@@ -860,7 +864,7 @@ yy3:
                TIMELIB_DEINIT;
                return TIMELIB_TIMEZONE;
        }
-#line 857 "ext/date/lib/parse_date.c"
+#line 861 "ext/date/lib/parse_date.c"
 yy4:
        YYDEBUG(4, *YYCURSOR);
        yych = *++YYCURSOR;
@@ -978,13 +982,13 @@ yy7:
 yy8:
        YYDEBUG(8, *YYCURSOR);
 
-#line 1389 "ext/date/lib/parse_date.re"
+#line 1393 "ext/date/lib/parse_date.re"
 {
 /*             printf("unexpected character: #%d, %c ", *s->tok, *s->tok); */
                s->errors++;
                goto std;
        }
-#line 971 "ext/date/lib/parse_date.c"
+#line 975 "ext/date/lib/parse_date.c"
 yy9:
        YYDEBUG(9, *YYCURSOR);
        yyaccept = 0;
@@ -2023,11 +2027,11 @@ yy44:
 yy45:
        YYDEBUG(45, *YYCURSOR);
 
-#line 1378 "ext/date/lib/parse_date.re"
+#line 1382 "ext/date/lib/parse_date.re"
 {
                goto std;
        }
-#line 1935 "ext/date/lib/parse_date.c"
+#line 1939 "ext/date/lib/parse_date.c"
 yy46:
        YYDEBUG(46, *YYCURSOR);
        yych = *++YYCURSOR;
@@ -2039,12 +2043,12 @@ yy47:
 yy48:
        YYDEBUG(48, *YYCURSOR);
 
-#line 1383 "ext/date/lib/parse_date.re"
+#line 1387 "ext/date/lib/parse_date.re"
 {
                s->pos = cursor; s->line++;
                goto std;
        }
-#line 1946 "ext/date/lib/parse_date.c"
+#line 1950 "ext/date/lib/parse_date.c"
 yy49:
        YYDEBUG(49, *YYCURSOR);
        yych = *++YYCURSOR;
@@ -2252,7 +2256,7 @@ yy67:
 yy68:
        YYDEBUG(68, *YYCURSOR);
 
-#line 1362 "ext/date/lib/parse_date.re"
+#line 1366 "ext/date/lib/parse_date.re"
 {
                timelib_ull i;
                DEBUG_OUTPUT("relative");
@@ -2267,7 +2271,7 @@ yy68:
                TIMELIB_DEINIT;
                return TIMELIB_RELATIVE;
        }
-#line 2127 "ext/date/lib/parse_date.c"
+#line 2131 "ext/date/lib/parse_date.c"
 yy69:
        YYDEBUG(69, *YYCURSOR);
        yych = *++YYCURSOR;
@@ -3244,7 +3248,7 @@ yy172:
 yy173:
        YYDEBUG(173, *YYCURSOR);
 
-#line 1306 "ext/date/lib/parse_date.re"
+#line 1310 "ext/date/lib/parse_date.re"
 {
                timelib_sll i;
                int         behavior;
@@ -3260,7 +3264,7 @@ yy173:
                TIMELIB_DEINIT;
                return TIMELIB_RELATIVE;
        }
-#line 2904 "ext/date/lib/parse_date.c"
+#line 2908 "ext/date/lib/parse_date.c"
 yy174:
        YYDEBUG(174, *YYCURSOR);
        yych = *++YYCURSOR;
@@ -5022,7 +5026,7 @@ yy341:
 yy342:
        YYDEBUG(342, *YYCURSOR);
 
-#line 1290 "ext/date/lib/parse_date.re"
+#line 1294 "ext/date/lib/parse_date.re"
 {
                const timelib_relunit* relunit;
                DEBUG_OUTPUT("daytext");
@@ -5037,7 +5041,7 @@ yy342:
                TIMELIB_DEINIT;
                return TIMELIB_WEEKDAY;
        }
-#line 4341 "ext/date/lib/parse_date.c"
+#line 4345 "ext/date/lib/parse_date.c"
 yy343:
        YYDEBUG(343, *YYCURSOR);
        yyaccept = 1;
@@ -6037,7 +6041,7 @@ yy405:
 yy406:
        YYDEBUG(406, *YYCURSOR);
 
-#line 1109 "ext/date/lib/parse_date.re"
+#line 1113 "ext/date/lib/parse_date.re"
 {
                DEBUG_OUTPUT("datetextual | datenoyear");
                TIMELIB_INIT;
@@ -6049,7 +6053,7 @@ yy406:
                TIMELIB_DEINIT;
                return TIMELIB_DATE_TEXT;
        }
-#line 5225 "ext/date/lib/parse_date.c"
+#line 5229 "ext/date/lib/parse_date.c"
 yy407:
        YYDEBUG(407, *YYCURSOR);
        yyaccept = 6;
@@ -6306,7 +6310,7 @@ yy431:
 yy432:
        YYDEBUG(432, *YYCURSOR);
 
-#line 1334 "ext/date/lib/parse_date.re"
+#line 1338 "ext/date/lib/parse_date.re"
 {
                int tz_not_found;
                DEBUG_OUTPUT("dateshortwithtimeshort | dateshortwithtimelong | dateshortwithtimelongtz");
@@ -6333,7 +6337,7 @@ yy432:
                TIMELIB_DEINIT;
                return TIMELIB_SHORTDATE_WITH_TIME;
        }
-#line 5457 "ext/date/lib/parse_date.c"
+#line 5461 "ext/date/lib/parse_date.c"
 yy433:
        YYDEBUG(433, *YYCURSOR);
        yyaccept = 7;
@@ -6692,7 +6696,7 @@ yy468:
 yy469:
        YYDEBUG(469, *YYCURSOR);
 
-#line 1083 "ext/date/lib/parse_date.re"
+#line 1087 "ext/date/lib/parse_date.re"
 {
                DEBUG_OUTPUT("datenoday");
                TIMELIB_INIT;
@@ -6704,7 +6708,7 @@ yy469:
                TIMELIB_DEINIT;
                return TIMELIB_DATE_NO_DAY;
        }
-#line 5754 "ext/date/lib/parse_date.c"
+#line 5758 "ext/date/lib/parse_date.c"
 yy470:
        YYDEBUG(470, *YYCURSOR);
        yyaccept = 6;
@@ -7164,7 +7168,7 @@ yy494:
 yy495:
        YYDEBUG(495, *YYCURSOR);
 
-#line 1221 "ext/date/lib/parse_date.re"
+#line 1225 "ext/date/lib/parse_date.re"
 {
                DEBUG_OUTPUT("pgtextshort");
                TIMELIB_INIT;
@@ -7176,7 +7180,7 @@ yy495:
                TIMELIB_DEINIT;
                return TIMELIB_PG_TEXT;
        }
-#line 6174 "ext/date/lib/parse_date.c"
+#line 6178 "ext/date/lib/parse_date.c"
 yy496:
        YYDEBUG(496, *YYCURSOR);
        yych = *++YYCURSOR;
@@ -9028,7 +9032,7 @@ yy596:
 yy597:
        YYDEBUG(597, *YYCURSOR);
 
-#line 1275 "ext/date/lib/parse_date.re"
+#line 1279 "ext/date/lib/parse_date.re"
 {
                DEBUG_OUTPUT("ago");
                TIMELIB_INIT;
@@ -9042,7 +9046,7 @@ yy597:
                TIMELIB_DEINIT;
                return TIMELIB_AGO;
        }
-#line 7836 "ext/date/lib/parse_date.c"
+#line 7840 "ext/date/lib/parse_date.c"
 yy598:
        YYDEBUG(598, *YYCURSOR);
        yyaccept = 1;
@@ -11361,7 +11365,7 @@ yy705:
 yy706:
        YYDEBUG(706, *YYCURSOR);
 
-#line 1122 "ext/date/lib/parse_date.re"
+#line 1126 "ext/date/lib/parse_date.re"
 {
                DEBUG_OUTPUT("datenoyearrev");
                TIMELIB_INIT;
@@ -11372,7 +11376,7 @@ yy706:
                TIMELIB_DEINIT;
                return TIMELIB_DATE_TEXT;
        }
-#line 9944 "ext/date/lib/parse_date.c"
+#line 9948 "ext/date/lib/parse_date.c"
 yy707:
        YYDEBUG(707, *YYCURSOR);
        yyaccept = 10;
@@ -11476,7 +11480,7 @@ yy715:
 yy716:
        YYDEBUG(716, *YYCURSOR);
 
-#line 912 "ext/date/lib/parse_date.re"
+#line 916 "ext/date/lib/parse_date.re"
 {
                DEBUG_OUTPUT("timetiny12 | timeshort12 | timelong12");
                TIMELIB_INIT;
@@ -11492,7 +11496,7 @@ yy716:
                TIMELIB_DEINIT;
                return TIMELIB_TIME12;
        }
-#line 10044 "ext/date/lib/parse_date.c"
+#line 10048 "ext/date/lib/parse_date.c"
 yy717:
        YYDEBUG(717, *YYCURSOR);
        yych = *++YYCURSOR;
@@ -11512,7 +11516,7 @@ yy718:
 yy719:
        YYDEBUG(719, *YYCURSOR);
 
-#line 929 "ext/date/lib/parse_date.re"
+#line 933 "ext/date/lib/parse_date.re"
 {
                int tz_not_found;
                DEBUG_OUTPUT("timeshort24 | timelong24 | iso8601long");
@@ -11535,7 +11539,7 @@ yy719:
                TIMELIB_DEINIT;
                return TIMELIB_TIME24_WITH_ZONE;
        }
-#line 10081 "ext/date/lib/parse_date.c"
+#line 10085 "ext/date/lib/parse_date.c"
 yy720:
        YYDEBUG(720, *YYCURSOR);
        yyaccept = 11;
@@ -11778,7 +11782,7 @@ yy744:
 yy745:
        YYDEBUG(745, *YYCURSOR);
 
-#line 1056 "ext/date/lib/parse_date.re"
+#line 1060 "ext/date/lib/parse_date.re"
 {
                DEBUG_OUTPUT("datefull");
                TIMELIB_INIT;
@@ -11791,7 +11795,7 @@ yy745:
                TIMELIB_DEINIT;
                return TIMELIB_DATE_FULL;
        }
-#line 10285 "ext/date/lib/parse_date.c"
+#line 10289 "ext/date/lib/parse_date.c"
 yy746:
        YYDEBUG(746, *YYCURSOR);
        yych = *++YYCURSOR;
@@ -12432,7 +12436,7 @@ yy814:
 yy815:
        YYDEBUG(815, *YYCURSOR);
 
-#line 1070 "ext/date/lib/parse_date.re"
+#line 1074 "ext/date/lib/parse_date.re"
 {
                DEBUG_OUTPUT("pointed date");
                TIMELIB_INIT;
@@ -12444,7 +12448,7 @@ yy815:
                TIMELIB_DEINIT;
                return TIMELIB_DATE_FULL_POINTED;
        }
-#line 10798 "ext/date/lib/parse_date.c"
+#line 10802 "ext/date/lib/parse_date.c"
 yy816:
        YYDEBUG(816, *YYCURSOR);
        yych = *++YYCURSOR;
@@ -13033,7 +13037,7 @@ yy860:
 yy861:
        YYDEBUG(861, *YYCURSOR);
 
-#line 1043 "ext/date/lib/parse_date.re"
+#line 1047 "ext/date/lib/parse_date.re"
 {
                DEBUG_OUTPUT("gnudateshort");
                TIMELIB_INIT;
@@ -13045,7 +13049,7 @@ yy861:
                TIMELIB_DEINIT;
                return TIMELIB_ISO_DATE;
        }
-#line 11307 "ext/date/lib/parse_date.c"
+#line 11311 "ext/date/lib/parse_date.c"
 yy862:
        YYDEBUG(862, *YYCURSOR);
        yyaccept = 12;
@@ -13156,7 +13160,7 @@ yy869:
 yy870:
        YYDEBUG(870, *YYCURSOR);
 
-#line 1016 "ext/date/lib/parse_date.re"
+#line 1020 "ext/date/lib/parse_date.re"
 {
                DEBUG_OUTPUT("americanshort | american");
                TIMELIB_INIT;
@@ -13170,7 +13174,7 @@ yy870:
                TIMELIB_DEINIT;
                return TIMELIB_AMERICAN;
        }
-#line 11414 "ext/date/lib/parse_date.c"
+#line 11418 "ext/date/lib/parse_date.c"
 yy871:
        YYDEBUG(871, *YYCURSOR);
        yyaccept = 13;
@@ -13432,7 +13436,7 @@ yy902:
 yy903:
        YYDEBUG(903, *YYCURSOR);
 
-#line 1247 "ext/date/lib/parse_date.re"
+#line 1251 "ext/date/lib/parse_date.re"
 {
                int tz_not_found;
                DEBUG_OUTPUT("clf");
@@ -13450,7 +13454,7 @@ yy903:
                TIMELIB_DEINIT;
                return TIMELIB_CLF;
        }
-#line 11628 "ext/date/lib/parse_date.c"
+#line 11632 "ext/date/lib/parse_date.c"
 yy904:
        YYDEBUG(904, *YYCURSOR);
        yyaccept = 14;
@@ -13850,7 +13854,7 @@ yy955:
 yy956:
        YYDEBUG(956, *YYCURSOR);
 
-#line 1234 "ext/date/lib/parse_date.re"
+#line 1238 "ext/date/lib/parse_date.re"
 {
                DEBUG_OUTPUT("pgtextreverse");
                TIMELIB_INIT;
@@ -13862,7 +13866,7 @@ yy956:
                TIMELIB_DEINIT;
                return TIMELIB_PG_TEXT;
        }
-#line 11932 "ext/date/lib/parse_date.c"
+#line 11936 "ext/date/lib/parse_date.c"
 yy957:
        YYDEBUG(957, *YYCURSOR);
        yych = *++YYCURSOR;
@@ -13995,7 +13999,7 @@ yy967:
 yy968:
        YYDEBUG(968, *YYCURSOR);
 
-#line 1266 "ext/date/lib/parse_date.re"
+#line 1270 "ext/date/lib/parse_date.re"
 {
                DEBUG_OUTPUT("year4");
                TIMELIB_INIT;
@@ -14003,7 +14007,7 @@ yy968:
                TIMELIB_DEINIT;
                return TIMELIB_CLF;
        }
-#line 12048 "ext/date/lib/parse_date.c"
+#line 12052 "ext/date/lib/parse_date.c"
 yy969:
        YYDEBUG(969, *YYCURSOR);
        yych = *++YYCURSOR;
@@ -14139,7 +14143,7 @@ yy976:
 yy977:
        YYDEBUG(977, *YYCURSOR);
 
-#line 1096 "ext/date/lib/parse_date.re"
+#line 1100 "ext/date/lib/parse_date.re"
 {
                DEBUG_OUTPUT("datenodayrev");
                TIMELIB_INIT;
@@ -14151,7 +14155,7 @@ yy977:
                TIMELIB_DEINIT;
                return TIMELIB_DATE_NO_DAY;
        }
-#line 12175 "ext/date/lib/parse_date.c"
+#line 12179 "ext/date/lib/parse_date.c"
 yy978:
        YYDEBUG(978, *YYCURSOR);
        yych = *++YYCURSOR;
@@ -14360,7 +14364,7 @@ yy996:
 yy997:
        YYDEBUG(997, *YYCURSOR);
 
-#line 1202 "ext/date/lib/parse_date.re"
+#line 1206 "ext/date/lib/parse_date.re"
 {
                timelib_sll w, d;
                DEBUG_OUTPUT("isoweek");
@@ -14378,7 +14382,7 @@ yy997:
                TIMELIB_DEINIT;
                return TIMELIB_ISO_WEEK;
        }
-#line 12362 "ext/date/lib/parse_date.c"
+#line 12366 "ext/date/lib/parse_date.c"
 yy998:
        YYDEBUG(998, *YYCURSOR);
        ++YYCURSOR;
@@ -14386,7 +14390,7 @@ yy998:
 yy999:
        YYDEBUG(999, *YYCURSOR);
 
-#line 1183 "ext/date/lib/parse_date.re"
+#line 1187 "ext/date/lib/parse_date.re"
 {
                timelib_sll w, d;
                DEBUG_OUTPUT("isoweekday");
@@ -14404,7 +14408,7 @@ yy999:
                TIMELIB_DEINIT;
                return TIMELIB_ISO_WEEK;
        }
-#line 12384 "ext/date/lib/parse_date.c"
+#line 12388 "ext/date/lib/parse_date.c"
 yy1000:
        YYDEBUG(1000, *YYCURSOR);
        yych = *++YYCURSOR;
@@ -14473,7 +14477,7 @@ yy1002:
 yy1003:
        YYDEBUG(1003, *YYCURSOR);
 
-#line 1170 "ext/date/lib/parse_date.re"
+#line 1174 "ext/date/lib/parse_date.re"
 {
                DEBUG_OUTPUT("pgydotd");
                TIMELIB_INIT;
@@ -14485,7 +14489,7 @@ yy1003:
                TIMELIB_DEINIT;
                return TIMELIB_PG_YEARDAY;
        }
-#line 12457 "ext/date/lib/parse_date.c"
+#line 12461 "ext/date/lib/parse_date.c"
 yy1004:
        YYDEBUG(1004, *YYCURSOR);
        yych = *++YYCURSOR;
@@ -14591,7 +14595,7 @@ yy1009:
 yy1010:
        YYDEBUG(1010, *YYCURSOR);
 
-#line 1134 "ext/date/lib/parse_date.re"
+#line 1138 "ext/date/lib/parse_date.re"
 {
                DEBUG_OUTPUT("datenocolon");
                TIMELIB_INIT;
@@ -14602,7 +14606,7 @@ yy1010:
                TIMELIB_DEINIT;
                return TIMELIB_DATE_NOCOLON;
        }
-#line 12556 "ext/date/lib/parse_date.c"
+#line 12560 "ext/date/lib/parse_date.c"
 yy1011:
        YYDEBUG(1011, *YYCURSOR);
        yych = *++YYCURSOR;
@@ -14700,7 +14704,7 @@ yy1020:
 yy1021:
        YYDEBUG(1021, *YYCURSOR);
 
-#line 1146 "ext/date/lib/parse_date.re"
+#line 1150 "ext/date/lib/parse_date.re"
 {
                int tz_not_found;
                DEBUG_OUTPUT("xmlrpc | xmlrpcnocolon | soap | wddx");
@@ -14723,7 +14727,7 @@ yy1021:
                TIMELIB_DEINIT;
                return TIMELIB_XMLRPC_SOAP;
        }
-#line 12655 "ext/date/lib/parse_date.c"
+#line 12659 "ext/date/lib/parse_date.c"
 yy1022:
        YYDEBUG(1022, *YYCURSOR);
        yych = *++YYCURSOR;
@@ -15347,7 +15351,7 @@ yy1111:
 yy1112:
        YYDEBUG(1112, *YYCURSOR);
 
-#line 1031 "ext/date/lib/parse_date.re"
+#line 1035 "ext/date/lib/parse_date.re"
 {
                DEBUG_OUTPUT("iso8601date | iso8601dateslash | dateslash");
                TIMELIB_INIT;
@@ -15358,7 +15362,7 @@ yy1112:
                TIMELIB_DEINIT;
                return TIMELIB_ISO_DATE;
        }
-#line 13108 "ext/date/lib/parse_date.c"
+#line 13112 "ext/date/lib/parse_date.c"
 yy1113:
        YYDEBUG(1113, *YYCURSOR);
        yyaccept = 19;
@@ -16451,7 +16455,7 @@ yy1204:
 yy1205:
        YYDEBUG(1205, *YYCURSOR);
 
-#line 953 "ext/date/lib/parse_date.re"
+#line 957 "ext/date/lib/parse_date.re"
 {
                DEBUG_OUTPUT("gnunocolon");
                TIMELIB_INIT;
@@ -16472,7 +16476,7 @@ yy1205:
                TIMELIB_DEINIT;
                return TIMELIB_GNU_NOCOLON;
        }
-#line 14034 "ext/date/lib/parse_date.c"
+#line 14038 "ext/date/lib/parse_date.c"
 yy1206:
        YYDEBUG(1206, *YYCURSOR);
        yych = *++YYCURSOR;
@@ -16569,7 +16573,7 @@ yy1212:
 yy1213:
        YYDEBUG(1213, *YYCURSOR);
 
-#line 998 "ext/date/lib/parse_date.re"
+#line 1002 "ext/date/lib/parse_date.re"
 {
                int tz_not_found;
                DEBUG_OUTPUT("iso8601nocolon");
@@ -16586,7 +16590,7 @@ yy1213:
                TIMELIB_DEINIT;
                return TIMELIB_ISO_NOCOLON;
        }
-#line 14132 "ext/date/lib/parse_date.c"
+#line 14136 "ext/date/lib/parse_date.c"
 yy1214:
        YYDEBUG(1214, *YYCURSOR);
        yyaccept = 22;
@@ -16941,7 +16945,7 @@ yy1237:
 yy1238:
        YYDEBUG(1238, *YYCURSOR);
 
-#line 888 "ext/date/lib/parse_date.re"
+#line 892 "ext/date/lib/parse_date.re"
 {
                timelib_ull i;
 
@@ -16964,7 +16968,7 @@ yy1238:
                TIMELIB_DEINIT;
                return TIMELIB_RELATIVE;
        }
-#line 14454 "ext/date/lib/parse_date.c"
+#line 14458 "ext/date/lib/parse_date.c"
 yy1239:
        YYDEBUG(1239, *YYCURSOR);
        yych = *++YYCURSOR;
@@ -17046,7 +17050,7 @@ yy1246:
 yy1247:
        YYDEBUG(1247, *YYCURSOR);
 
-#line 876 "ext/date/lib/parse_date.re"
+#line 880 "ext/date/lib/parse_date.re"
 {
                DEBUG_OUTPUT("tomorrow");
                TIMELIB_INIT;
@@ -17057,7 +17061,7 @@ yy1247:
                TIMELIB_DEINIT;
                return TIMELIB_RELATIVE;
        }
-#line 14529 "ext/date/lib/parse_date.c"
+#line 14533 "ext/date/lib/parse_date.c"
 yy1248:
        YYDEBUG(1248, *YYCURSOR);
        yych = *++YYCURSOR;
@@ -17071,7 +17075,7 @@ yy1249:
 yy1250:
        YYDEBUG(1250, *YYCURSOR);
 
-#line 866 "ext/date/lib/parse_date.re"
+#line 870 "ext/date/lib/parse_date.re"
 {
                DEBUG_OUTPUT("midnight | today");
                TIMELIB_INIT;
@@ -17080,7 +17084,7 @@ yy1250:
                TIMELIB_DEINIT;
                return TIMELIB_RELATIVE;
        }
-#line 14546 "ext/date/lib/parse_date.c"
+#line 14550 "ext/date/lib/parse_date.c"
 yy1251:
        YYDEBUG(1251, *YYCURSOR);
        yych = *++YYCURSOR;
@@ -17175,7 +17179,7 @@ yy1258:
 yy1259:
        YYDEBUG(1259, *YYCURSOR);
 
-#line 845 "ext/date/lib/parse_date.re"
+#line 849 "ext/date/lib/parse_date.re"
 {
                DEBUG_OUTPUT("now");
                TIMELIB_INIT;
@@ -17183,7 +17187,7 @@ yy1259:
                TIMELIB_DEINIT;
                return TIMELIB_RELATIVE;
        }
-#line 14631 "ext/date/lib/parse_date.c"
+#line 14635 "ext/date/lib/parse_date.c"
 yy1260:
        YYDEBUG(1260, *YYCURSOR);
        yych = *++YYCURSOR;
@@ -17209,7 +17213,7 @@ yy1261:
 yy1262:
        YYDEBUG(1262, *YYCURSOR);
 
-#line 854 "ext/date/lib/parse_date.re"
+#line 858 "ext/date/lib/parse_date.re"
 {
                DEBUG_OUTPUT("noon");
                TIMELIB_INIT;
@@ -17220,7 +17224,7 @@ yy1262:
                TIMELIB_DEINIT;
                return TIMELIB_RELATIVE;
        }
-#line 14662 "ext/date/lib/parse_date.c"
+#line 14666 "ext/date/lib/parse_date.c"
 yy1263:
        YYDEBUG(1263, *YYCURSOR);
        yych = *++YYCURSOR;
@@ -17289,7 +17293,7 @@ yy1270:
 yy1271:
        YYDEBUG(1271, *YYCURSOR);
 
-#line 833 "ext/date/lib/parse_date.re"
+#line 837 "ext/date/lib/parse_date.re"
 {
                DEBUG_OUTPUT("yesterday");
                TIMELIB_INIT;
@@ -17300,10 +17304,10 @@ yy1271:
                TIMELIB_DEINIT;
                return TIMELIB_RELATIVE;
        }
-#line 14724 "ext/date/lib/parse_date.c"
+#line 14728 "ext/date/lib/parse_date.c"
 }
 }
-#line 1394 "ext/date/lib/parse_date.re"
+#line 1398 "ext/date/lib/parse_date.re"
 
 }
 
index c356386ec4213778ea13e6bc6a840691518fa204..50f2c0e9d57298a968613fe1622db9d876390a6a 100644 (file)
@@ -582,6 +582,9 @@ static timelib_tz_lookup_table* zone_search(const char *word, long gmtoffset, in
        timelib_tz_lookup_table  *tp, *first_found_elem;
        timelib_tz_lookup_table  *fmp;
        
+       if (gmtoffset == -1 && !strcmp(word, "UTC")) {
+               goto skip_name_match;
+       }
        for (tp = timelib_timezone_lookup; tp->name; tp++) {
                if (strcasecmp(word, tp->name) == 0) {
                        if (!first_found) {
@@ -599,6 +602,7 @@ static timelib_tz_lookup_table* zone_search(const char *word, long gmtoffset, in
        if (first_found) {
                return first_found_elem;
        }
+skip_name_match:
        /* Still didn't find anything, let's find the zone solely based on
         * offset/isdst then */
        for (fmp = timelib_timezone_fallbackmap; fmp->name; fmp++) {
index 1b5681eae6531b2c4a39e8037e4b2796337cb9b9..1771413735b9a55df62651f05ff7d95924f9dbf8 100644 (file)
@@ -9,8 +9,8 @@ date.timezone=
        echo date('e'), "\n";
 ?>
 --EXPECTF--
-Strict Standards: date_default_timezone_get(): It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. We selected 'UTC' for 'UTC/0.0/no DST' instead in %sdate_default_timezone_get-1.php on line 3
-UTC
+Strict Standards: date_default_timezone_get(): It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. We selected 'Europe/London' for 'UTC/0.0/no DST' instead in %sdate_default_timezone_get-1.php on line 3
+Europe/London
 
-Strict Standards: date(): It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. We selected 'UTC' for 'UTC/0.0/no DST' instead in %sdate_default_timezone_get-1.php on line 4
-UTC
\ No newline at end of file
+Strict Standards: date(): It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. We selected 'Europe/London' for 'UTC/0.0/no DST' instead in %sdate_default_timezone_get-1.php on line 4
+Europe/London
\ No newline at end of file
index 78face70a76795da5b740643013c1cf9c681aa82..90916e9238edf244054ba8f7f37eb2d0265a1ed2 100644 (file)
@@ -18,11 +18,11 @@ date.timezone=
        echo date(DATE_ISO8601, $date4), "\n";
 ?>
 --EXPECTF--
-Strict Standards: strtotime(): It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. We selected 'UTC' for 'UTC/0.0/no DST' instead in %sdate_default_timezone_set-1.php on line 3
+Strict Standards: strtotime(): It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. We selected 'Europe/London' for 'UTC/0.0/no DST' instead in %sdate_default_timezone_set-1.php on line 3
 
-Strict Standards: strtotime(): It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. We selected 'UTC' for 'UTC/0.0/no DST' instead in %sdate_default_timezone_set-1.php on line 4
+Strict Standards: strtotime(): It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. We selected 'Europe/London' for 'UTC/0.0/no DST' instead in %sdate_default_timezone_set-1.php on line 4
 America/Indiana/Knox
 2005-01-12T03:00:00-0500
-2005-07-12T03:00:00-0500
+2005-07-12T02:00:00-0500
 2005-01-12T08:00:00-0500
 2005-07-12T08:00:00-0500