summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2022-02-23 14:04:41 +0100
committerRemi Collet <remi@php.net>2022-02-23 14:04:41 +0100
commitf53897256087e4948b95aced844484db3c39a442 (patch)
tree90e3053ef3ae3acf6c68394e51a9d2c998d96726
parent4ce295a9e9974bb75b63a8890c9388c0c82f8a82 (diff)
handle tzdata up to .26
-rw-r--r--php-7.3.3-systzdata-v19.patch26
1 files changed, 18 insertions, 8 deletions
diff --git a/php-7.3.3-systzdata-v19.patch b/php-7.3.3-systzdata-v19.patch
index e6aee58..866729b 100644
--- a/php-7.3.3-systzdata-v19.patch
+++ b/php-7.3.3-systzdata-v19.patch
@@ -55,7 +55,7 @@ index 20e4164aaa..a61243646d 100644
timelib_sources="lib/astro.c lib/dow.c lib/parse_date.c lib/parse_tz.c
lib/timelib.c lib/tm2unixtime.c lib/unixtime2tm.c lib/parse_iso_intervals.c lib/interval.c"
diff --git a/ext/date/lib/parse_tz.c b/ext/date/lib/parse_tz.c
-index 020da3135e..bfa167c8ac 100644
+index 020da3135e..12e68ef043 100644
--- a/ext/date/lib/parse_tz.c
+++ b/ext/date/lib/parse_tz.c
@@ -26,8 +26,21 @@
@@ -92,7 +92,7 @@ index 020da3135e..bfa167c8ac 100644
/* read ID */
version = (*tzf)[3] - '0';
*tzf += 4;
-@@ -412,7 +430,457 @@ void timelib_dump_tzinfo(timelib_tzinfo *tz)
+@@ -412,7 +430,467 @@ void timelib_dump_tzinfo(timelib_tzinfo *tz)
}
}
@@ -341,8 +341,18 @@ index 020da3135e..bfa167c8ac 100644
+ isdigit(buf[12]) &&
+ isdigit(buf[13]) &&
+ islower(buf[14])) {
-+ buf[16] = 0;
-+ buf[15] = buf[14] - 'a' + '1';
++ if (buf[14] >= 't') { /* 2022t = 2022.20 */
++ buf[17] = 0;
++ buf[16] = buf[14] - 't' + '0';
++ buf[15] = '2';
++ } else if (buf[14] >= 'j') { /* 2022j = 2022.10 */
++ buf[17] = 0;
++ buf[16] = buf[14] - 'j' + '0';
++ buf[15] = '1';
++ } else { /* 2022a = 2022.1 */
++ buf[16] = 0;
++ buf[15] = buf[14] - 'a' + '1';
++ }
+ buf[14] = '.';
+ db->version = buf+10;
+ }
@@ -551,7 +561,7 @@ index 020da3135e..bfa167c8ac 100644
{
int left = 0, right = tzdb->index_size - 1;
-@@ -438,9 +906,49 @@ static int seek_to_tz_position(const unsigned char **tzf, char *timezone, const
+@@ -438,9 +916,49 @@ static int seek_to_tz_position(const unsigned char **tzf, char *timezone, const
return 0;
}
@@ -601,7 +611,7 @@ index 020da3135e..bfa167c8ac 100644
}
const timelib_tzdb_index_entry *timelib_timezone_identifiers_list(const timelib_tzdb *tzdb, int *count)
-@@ -452,7 +960,30 @@ const timelib_tzdb_index_entry *timelib_timezone_identifiers_list(const timelib_
+@@ -452,7 +970,30 @@ const timelib_tzdb_index_entry *timelib_timezone_identifiers_list(const timelib_
int timelib_timezone_id_is_valid(char *timezone, const timelib_tzdb *tzdb)
{
const unsigned char *tzf;
@@ -633,7 +643,7 @@ index 020da3135e..bfa167c8ac 100644
}
static int skip_64bit_preamble(const unsigned char **tzf, timelib_tzinfo *tz)
-@@ -494,12 +1025,14 @@ static timelib_tzinfo* timelib_tzinfo_ctor(char *name)
+@@ -494,12 +1035,14 @@ static timelib_tzinfo* timelib_tzinfo_ctor(char *name)
timelib_tzinfo *timelib_parse_tzfile(char *timezone, const timelib_tzdb *tzdb, int *error_code)
{
const unsigned char *tzf;
@@ -649,7 +659,7 @@ index 020da3135e..bfa167c8ac 100644
tmp = timelib_tzinfo_ctor(timezone);
version = read_preamble(&tzf, tmp, &type);
-@@ -534,11 +1067,36 @@ timelib_tzinfo *timelib_parse_tzfile(char *timezone, const timelib_tzdb *tzdb, i
+@@ -534,11 +1077,36 @@ timelib_tzinfo *timelib_parse_tzfile(char *timezone, const timelib_tzdb *tzdb, i
}
skip_posix_string(&tzf, tmp);