Merge branch 'PHP-5.4' into PHP-5.5

Conflicts:
	ext/date/lib/parse_date.c
This commit is contained in:
Derick Rethans 2014-01-25 16:16:23 +01:00
commit 93ede745bc
4 changed files with 56 additions and 44 deletions

View File

@ -1,40 +1,42 @@
{ "sst", 0, -11, "Pacific/Apia" },
{ "hst", 0, -10, "Pacific/Honolulu" },
{ "akst", 0, -9, "America/Anchorage" },
{ "akdt", 1, -8, "America/Anchorage" },
{ "pst", 0, -8, "America/Los_Angeles" },
{ "pdt", 1, -7, "America/Los_Angeles" },
{ "mst", 0, -7, "America/Denver" },
{ "mdt", 1, -6, "America/Denver" },
{ "cst", 0, -6, "America/Chicago" },
{ "cdt", 1, -5, "America/Chicago" },
{ "est", 0, -5, "America/New_York" },
{ "edt", 1, -4, "America/New_York" },
{ "ast", 0, -4, "America/Halifax" },
{ "adt", 1, -3, "America/Halifax" },
{ "brt", 0, -3, "America/Sao_Paulo" },
{ "brst", 1, -2, "America/Sao_Paulo" },
{ "azost", 0, -1, "Atlantic/Azores" },
{ "azodt", 1, 0, "Atlantic/Azores" },
{ "gmt", 0, 0, "Europe/London" },
{ "bst", 1, 1, "Europe/London" },
{ "cet", 0, 1, "Europe/Paris" },
{ "cest", 1, 2, "Europe/Paris" },
{ "eet", 0, 2, "Europe/Helsinki" },
{ "eest", 1, 3, "Europe/Helsinki" },
{ "msk", 0, 3, "Europe/Moscow" },
{ "msd", 1, 4, "Europe/Moscow" },
{ "gst", 0, 4, "Asia/Dubai" },
{ "pkt", 0, 5, "Asia/Karachi" },
{ "ist", 0, 5.5, "Asia/Kolkata" },
{ "npt", 0, 5.75, "Asia/Katmandu" },
{ "yekt", 1, 6, "Asia/Yekaterinburg" },
{ "novst", 1, 7, "Asia/Novosibirsk" },
{ "krat", 0, 7, "Asia/Krasnoyarsk" },
{ "krast", 1, 8, "Asia/Krasnoyarsk" },
{ "jst", 0, 9, "Asia/Tokyo" },
{ "est", 0, 10, "Australia/Melbourne" },
{ "cst", 1, 10.5, "Australia/Adelaide" },
{ "est", 1, 11, "Australia/Melbourne" },
{ "nzst", 0, 12, "Pacific/Auckland" },
{ "nzdt", 1, 13, "Pacific/Auckland" },
{ "sst", 0, -660, "Pacific/Apia" },
{ "hst", 0, -600, "Pacific/Honolulu" },
{ "akst", 0, -540, "America/Anchorage" },
{ "akdt", 1, -480, "America/Anchorage" },
{ "pst", 0, -480, "America/Los_Angeles" },
{ "pdt", 1, -420, "America/Los_Angeles" },
{ "mst", 0, -420, "America/Denver" },
{ "mdt", 1, -360, "America/Denver" },
{ "cst", 0, -360, "America/Chicago" },
{ "cdt", 1, -300, "America/Chicago" },
{ "est", 0, -300, "America/New_York" },
{ "vet", 0, -270, "America/Caracas" },
{ "edt", 1, -240, "America/New_York" },
{ "ast", 0, -240, "America/Halifax" },
{ "adt", 1, -180, "America/Halifax" },
{ "brt", 0, -180, "America/Sao_Paulo" },
{ "brst", 1, -120, "America/Sao_Paulo" },
{ "azost", 0, -60, "Atlantic/Azores" },
{ "azodt", 1, 0, "Atlantic/Azores" },
{ "gmt", 0, 0, "Europe/London" },
{ "bst", 1, 60, "Europe/London" },
{ "cet", 0, 60, "Europe/Paris" },
{ "cest", 1, 120, "Europe/Paris" },
{ "eet", 0, 120, "Europe/Helsinki" },
{ "eest", 1, 180, "Europe/Helsinki" },
{ "msk", 0, 180, "Europe/Moscow" },
{ "msd", 1, 240, "Europe/Moscow" },
{ "gst", 0, 240, "Asia/Dubai" },
{ "pkt", 0, 300, "Asia/Karachi" },
{ "ist", 0, 330, "Asia/Kolkata" },
{ "npt", 0, 345, "Asia/Katmandu" },
{ "yekt", 1, 360, "Asia/Yekaterinburg" },
{ "novst", 1, 420, "Asia/Novosibirsk" },
{ "krat", 0, 420, "Asia/Krasnoyarsk" },
{ "cst", 0, 480, "Asia/Shanghai" },
{ "krast", 1, 480, "Asia/Krasnoyarsk" },
{ "jst", 0, 540, "Asia/Tokyo" },
{ "est", 0, 600, "Australia/Melbourne" },
{ "cst", 1, 630, "Australia/Adelaide" },
{ "est", 1, 660, "Australia/Melbourne" },
{ "nzst", 0, 720, "Pacific/Auckland" },
{ "nzdt", 1, 780, "Pacific/Auckland" },

View File

@ -1,10 +1,10 @@
/* Generated by re2c 0.13.5 on Sun Aug 25 15:12:48 2013 */
/* Generated by re2c 0.13.5 on Sat Jan 25 16:16:11 2014 */
#line 1 "ext/date/lib/parse_date.re"
/*
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2014 The PHP Group |
| Copyright (c) 1997-2013 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@ -717,7 +717,7 @@ const static timelib_tz_lookup_table* zone_search(const char *word, long gmtoffs
/* Still didn't find anything, let's find the zone solely based on
* offset/isdst then */
for (fmp = timelib_timezone_fallbackmap; fmp->name; fmp++) {
if ((fmp->gmtoffset * 3600) == gmtoffset && fmp->type == isdst) {
if ((fmp->gmtoffset * 60) == gmtoffset && fmp->type == isdst) {
return fmp;
}
}

View File

@ -715,7 +715,7 @@ const static timelib_tz_lookup_table* zone_search(const char *word, long gmtoffs
/* Still didn't find anything, let's find the zone solely based on
* offset/isdst then */
for (fmp = timelib_timezone_fallbackmap; fmp->name; fmp++) {
if ((fmp->gmtoffset * 3600) == gmtoffset && fmp->type == isdst) {
if ((fmp->gmtoffset * 60) == gmtoffset && fmp->type == isdst) {
return fmp;
}
}

View File

@ -0,0 +1,10 @@
--TEST--
Bug #44780 (some time zone offsets not recognized by timezone_name_from_abbr)
--FILE--
<?php
var_dump( timezone_name_from_abbr("", 5.5*3600, false) );
var_dump( timezone_name_from_abbr("", 28800, false) );
?>
--EXPECT--
string(12) "Asia/Kolkata"
string(13) "Asia/Shanghai"