]> granicus.if.org Git - php/commitdiff
- Fixed bug #45529 (new DateTimeZone() and date_create()->getTimezone() behave
authorDerick Rethans <derick@php.net>
Wed, 16 Jul 2008 15:40:01 +0000 (15:40 +0000)
committerDerick Rethans <derick@php.net>
Wed, 16 Jul 2008 15:40:01 +0000 (15:40 +0000)
  different).

ext/date/lib/parse_date.c
ext/date/lib/parse_date.re

index b03c53bac3a96616783545825e7d7fb4606a50c8..daa256a10fa5c66aaf9620365cd68741c5ec2f8a 100644 (file)
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Tue Jul 15 19:35:53 2008 */
+/* Generated by re2c 0.13.5 on Wed Jul 16 17:39:20 2008 */
 #line 1 "ext/date/lib/parse_date.re"
 /*
    +----------------------------------------------------------------------+
@@ -800,7 +800,7 @@ static long timelib_get_zone(char **ptr, int *dst, timelib_time *t, int *tz_not_
                }
 #endif
                /* If we have a TimeZone identifier to start with, use it */
-               if (strstr(tz_abbr, "/")) {
+               if (strstr(tz_abbr, "/") || strcmp(tz_abbr, "UTC") == 0) {
                        if ((res = timelib_parse_tzfile(tz_abbr, tzdb)) != NULL) {
                                t->tz_info = res;
                                t->zone_type = TIMELIB_ZONETYPE_ID;
index 14bd7e88db4a737daddbccf39e44ee4b01cf463d..2a66d51461cddbe1887e5e9df948025e487e1f85 100644 (file)
@@ -798,7 +798,7 @@ static long timelib_get_zone(char **ptr, int *dst, timelib_time *t, int *tz_not_
                }
 #endif
                /* If we have a TimeZone identifier to start with, use it */
-               if (strstr(tz_abbr, "/")) {
+               if (strstr(tz_abbr, "/") || strcmp(tz_abbr, "UTC") == 0) {
                        if ((res = timelib_parse_tzfile(tz_abbr, tzdb)) != NULL) {
                                t->tz_info = res;
                                t->zone_type = TIMELIB_ZONETYPE_ID;