mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Merge branch 'PHP-8.2'
This commit is contained in:
commit
cc4e958932
3 changed files with 18 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
|||
/* Generated by re2c 0.15.3 on Thu Dec 1 10:59:46 2022 */
|
||||
/* Generated by re2c 0.15.3 on Tue Jan 10 15:16:26 2023 */
|
||||
#line 1 "ext/date/lib/parse_date.re"
|
||||
/*
|
||||
* The MIT License (MIT)
|
||||
|
@ -787,7 +787,7 @@ static timelib_long timelib_lookup_abbr(const char **ptr, int *dst, char **tz_ab
|
|||
(**ptr >= 'A' && **ptr <= 'Z') ||
|
||||
(**ptr >= 'a' && **ptr <= 'z') ||
|
||||
(**ptr >= '0' && **ptr <= '9') ||
|
||||
**ptr == '/' || **ptr == '_' || **ptr == '-'
|
||||
**ptr == '/' || **ptr == '_' || **ptr == '-' || **ptr == '+'
|
||||
) {
|
||||
++*ptr;
|
||||
}
|
||||
|
|
|
@ -785,7 +785,7 @@ static timelib_long timelib_lookup_abbr(const char **ptr, int *dst, char **tz_ab
|
|||
(**ptr >= 'A' && **ptr <= 'Z') ||
|
||||
(**ptr >= 'a' && **ptr <= 'z') ||
|
||||
(**ptr >= '0' && **ptr <= '9') ||
|
||||
**ptr == '/' || **ptr == '_' || **ptr == '-'
|
||||
**ptr == '/' || **ptr == '_' || **ptr == '-' || **ptr == '+'
|
||||
) {
|
||||
++*ptr;
|
||||
}
|
||||
|
|
15
ext/date/tests/gh10218.phpt
Normal file
15
ext/date/tests/gh10218.phpt
Normal file
|
@ -0,0 +1,15 @@
|
|||
--TEST--
|
||||
Bug GH-10218 (DateTimeZone fails to parse time zones that contain the "+" character)
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(new DateTime('now', new DateTimeZone('Etc/GMT+1')));
|
||||
?>
|
||||
--EXPECTF--
|
||||
object(DateTime)#%d (%d) {
|
||||
["date"]=>
|
||||
string(%d) "%s"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
string(9) "Etc/GMT+1"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue