summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2022-02-23 14:01:06 +0100
committerRemi Collet <remi@php.net>2022-02-23 14:01:06 +0100
commit81df5edad23809c18d78f809840ea27a8d2bd2ba (patch)
treeeabf360ea5379b99b13ba86067228a779c2c508c
parentd102862ce98fa02a2ba31ae051e631d3f9640d0b (diff)
handle tzdata up to .26
-rw-r--r--php-8.0.10-systzdata-v21.patch28
1 files changed, 19 insertions, 9 deletions
diff --git a/php-8.0.10-systzdata-v21.patch b/php-8.0.10-systzdata-v21.patch
index 990266f..779f538 100644
--- a/php-8.0.10-systzdata-v21.patch
+++ b/php-8.0.10-systzdata-v21.patch
@@ -57,7 +57,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 e9bd0f136d..9ec26bec3d 100644
+index e9bd0f136d..c04ff01adc 100644
--- a/ext/date/lib/parse_tz.c
+++ b/ext/date/lib/parse_tz.c
@@ -26,8 +26,21 @@
@@ -94,7 +94,7 @@ index e9bd0f136d..9ec26bec3d 100644
/* read ID */
version = (*tzf)[3] - '0';
*tzf += 4;
-@@ -435,7 +453,457 @@ void timelib_dump_tzinfo(timelib_tzinfo *tz)
+@@ -435,7 +453,467 @@ void timelib_dump_tzinfo(timelib_tzinfo *tz)
}
}
@@ -343,8 +343,18 @@ index e9bd0f136d..9ec26bec3d 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;
+ }
@@ -553,7 +563,7 @@ index e9bd0f136d..9ec26bec3d 100644
{
int left = 0, right = tzdb->index_size - 1;
-@@ -461,9 +929,49 @@ static int seek_to_tz_position(const unsigned char **tzf, const char *timezone,
+@@ -461,9 +939,49 @@ static int seek_to_tz_position(const unsigned char **tzf, const char *timezone,
return 0;
}
@@ -603,7 +613,7 @@ index e9bd0f136d..9ec26bec3d 100644
}
const timelib_tzdb_index_entry *timelib_timezone_identifiers_list(const timelib_tzdb *tzdb, int *count)
-@@ -475,7 +983,30 @@ const timelib_tzdb_index_entry *timelib_timezone_identifiers_list(const timelib_
+@@ -475,7 +993,30 @@ const timelib_tzdb_index_entry *timelib_timezone_identifiers_list(const timelib_
int timelib_timezone_id_is_valid(const char *timezone, const timelib_tzdb *tzdb)
{
const unsigned char *tzf;
@@ -635,7 +645,7 @@ index e9bd0f136d..9ec26bec3d 100644
}
static int skip_64bit_preamble(const unsigned char **tzf, timelib_tzinfo *tz)
-@@ -517,6 +1048,8 @@ static timelib_tzinfo* timelib_tzinfo_ctor(const char *name)
+@@ -517,6 +1058,8 @@ static timelib_tzinfo* timelib_tzinfo_ctor(const char *name)
timelib_tzinfo *timelib_parse_tzfile(const char *timezone, const timelib_tzdb *tzdb, int *error_code)
{
const unsigned char *tzf;
@@ -644,7 +654,7 @@ index e9bd0f136d..9ec26bec3d 100644
timelib_tzinfo *tmp;
int version;
int transitions_result, types_result;
-@@ -524,7 +1057,7 @@ timelib_tzinfo *timelib_parse_tzfile(const char *timezone, const timelib_tzdb *t
+@@ -524,7 +1067,7 @@ timelib_tzinfo *timelib_parse_tzfile(const char *timezone, const timelib_tzdb *t
*error_code = TIMELIB_ERROR_NO_ERROR;
@@ -653,7 +663,7 @@ index e9bd0f136d..9ec26bec3d 100644
tmp = timelib_tzinfo_ctor(timezone);
version = read_preamble(&tzf, tmp, &type);
-@@ -563,11 +1096,36 @@ timelib_tzinfo *timelib_parse_tzfile(const char *timezone, const timelib_tzdb *t
+@@ -563,11 +1106,36 @@ timelib_tzinfo *timelib_parse_tzfile(const char *timezone, const timelib_tzdb *t
}
skip_posix_string(&tzf, tmp);