mirror of
https://github.com/php/php-src.git
synced 2024-11-24 02:15:04 +08:00
- Fixed bug #46111 (Some timezone identifiers can not be parsed).
This commit is contained in:
parent
b42dc0d061
commit
3025ca8e17
1
NEWS
1
NEWS
@ -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
@ -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";
|
||||
|
21
ext/date/tests/bug46111.phpt
Normal file
21
ext/date/tests/bug46111.phpt
Normal 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]
|
Loading…
Reference in New Issue
Block a user