- Fixed bug #46111 (Some timezone identifiers can not be parsed).

This commit is contained in:
Derick Rethans 2010-03-07 19:18:06 +00:00
parent b42dc0d061
commit 3025ca8e17
4 changed files with 4855 additions and 4042 deletions

1
NEWS
View File

@ -33,6 +33,7 @@ PHP NEWS
- Fixed bug #49059 (DateTime::diff() repeats previous sub() operation).
(yoarvi@gmail.com, Derick)
- Fixed bug #48902 (Timezone database fallback map is outdated). (Derick)
- Fixed bug #46111 (Some timezone identifiers can not be parsed). (Derick)
?? ??? 20??, PHP 5.3.2

File diff suppressed because it is too large Load Diff

View File

@ -855,7 +855,7 @@ minutelz = [0-5][0-9];
second = minute | "60";
secondlz = minutelz | "60";
meridian = ([AaPp] "."? [Mm] "."?) [\000\t ];
tz = "("? [A-Za-z]{1,6} ")"? | [A-Z][a-z]+([_/][A-Z][a-z]+)+;
tz = "("? [A-Za-z]{1,6} ")"? | [A-Z][a-z]+([_/-][A-Za-z]+)+;
tzcorrection = "GMT"? [+-] hour24 ":"? minute?;
daysuf = "st" | "nd" | "rd" | "th";

View File

@ -0,0 +1,21 @@
--TEST--
Bug #46111 (strtotime() returns false for some valid timezones)
--FILE--
<?php
date_default_timezone_set('Asia/Calcutta');
$timezones = timezone_identifiers_list();
# An empty list indicates no errors
print "[strtotime(timezone) == false - Begin List]\n";
foreach ($timezones as $zone) {
$date_string = "2008-01-01 13:00:00 " . $zone;
if (!strtotime($date_string)) {
echo $zone . "\n";
}
}
print "[strtotime(timezone) == false - End List]\n";
?>
--EXPECT--
[strtotime(timezone) == false - Begin List]
[strtotime(timezone) == false - End List]